There are times when you can immerse yourself in your work and times when you can't, just as there are fluctuations in your mood. You may also find yourself thinking about various things.
What I recommend for you is a place where you can be mentally healed. How about taking a walk in places such as botanical gardens or herb gardens? The healing effects of plants should also help clear your mind.