Yeah, I get that too .... got something that needs finishing I build up energy and need to release it before it distracts me to extinction.
So I tend to sneak off somewhere quiet - office doors and blinds closed if at work, lights off because my office at home has no curtains if I'm working late at home - close my eyes and put the stress out of my mind while I start to play with my cock through my pants, then taking them off and continuing, licking the precum off my fingers when they get wet, letting my whole body fall into the feel of it until I cum. Then I sit for a moment in the glow, before it's clean up and finish that damn project time. Hope that doesn't distract you