I wonder if it'd be helpful to have a daily mindfulness meditation practice on the same timing schedule used for work.
ie, if you work for 25 minutes ala pomodoro, then in the morning or evening do a 25 minute sitting. If you do 42 minutes of work, do a 42 minute per sitting.
It'd be one more thing every day to help train yourself into focusing during the work periods.