For myself, a large part of even starting to get a handle on that was realizing that basically what's going on is that you think, albeit subconsciously, that there is a much higher than actual probability of you completing a dopamine feedback loop by smashing F5.
IIRC, our brains release dopamine disproportionately when they think that there's about an even chance of a "reward", for lack of a better term at the moment.
To help counter that, I've started breaking down tasks and using an organizational system that provides quick feedback. For me, this is org-mode on emacs and org-mobile for android and a Dropbox account. I wouldn't say it's solved the issue for me, but making sure I can get fast feedback (positive and negative) about what I've scheduled, and what I need to get done, and see what amounts to a green bar increase, no matter where I'm at, helps immensely.