(1) Recognize that if I'm struggling to focus, I'm probably either (a) not interested in what I'm doing or (b) have too much on my plate.
(2) If I'm struggling to focus day after day, find something else to do.
(3) If I have too much on my plate, insist that my employer lighten the load or, once again, find something else to do.
It's not easy. Taken to its logical conclusion, I'm suggesting quitting jobs that aren't interesting or demand too much multitasking in favour of those that are mostly interesting and allow you to do one thing at a time.
That's sooooo much easier said than done.
But for me, it's the only thing that works. Yes, I meditate, keep studious notes and lists, make use of project management software, take my medication... and all of that definitely helps. But it's not enough. I've found there's no solution to getting me to be productive in a job I hate, am not interested in, or demands too much and sets me up for failure. There's not enough medication or self-help in the world for that.
How much time I spend on HN is a great barometer for it. If I find myself struggling to stay off HN and do the task in front of me, I have to first look at myself and see if I'm doing all the things I know that help. And if those things aren't enough, then I know the problem is the job. And jobs don't change. Only people do.
So if your job sucks, find a new one as soon as possible. That's what I usually do, anyway.