The Pomodoro method works for me. Set a timer for 25 minutes. Decide the task (or task list) you're going to do. Make it as specific as possible, for example "write 10 ideas of things to do at work next year and rate them by how desirable and achievable they are". Then start the timer and do the task. When the timer goes off, you have to take a 5 minute break. Whether you've been productove or distracted, doesn't matter. You HAVE to take a break. Drink something, go to the toilet, reply to a message whatever. Timer goes off after 5 minutes of break time. You've got a fresh start to try again.
For me, the first pomodoro is often wasted, sometimes even the first 2, but the forced break (I only have 25 minutes to a "deadline") and mental reset afterwards help to create that setting to be productive.