Slave:
Yes, I do have ADD and am treated for it. Perhaps we do have the same issue. There's something about subtle optimizations of the task on hand. It can happen in a lot of writing or creative endeavors. It tends to make endeavors stall.
Writers cope with the issue by giving themselves permission to do a "crappy first draft". It might be applicable to coders too. I'll have to dry that some time.
RTFM
You're coding in your head gets me thinking about a small variation to that tactic. Personally, for me, it would be with whiteboard and paper. It's the same principle I think. Sometimes, the wise move is to stay away from the keyboard.
So that gives me two tactics to try. Thanks!