time blocking has a tendency to do me wonders - If I have things allocated in a time window I tend to dig into them. Set a stopwatch and give yourself intermittent breaks as rewards every X period of time - that tends to work as well.
Gym in the morning - walk afterwork and reading to put yourself to bed all help in my routine.
Yeah, taking a walk outside always works for me! Getting some fresh air and a change of scenery helps reset my mind and come back focused. Highly recommend trying it next time you hit a slump!