Thinking itself is work. When you're thinking too much, anything that's not "thinking too much" causes context switching, which is a hard task on its own. Human brain cannot multitask, so you can't work while you're already doing a lot of mental work. The trick is to do things that are fun (which, for some people is doing creative work) such as playing games, taking a shower or whatever makes you relaxed. Once that chain of thoughts is broken, you can start working again.
Telling this from my personal experience, because I can't go from overthinking about my business to designing a database model or fix an issue. I need to take a mindless break, like showering or making coffee, or just grabbing a teaspoon of ice cream from the freezer. Those few moments work as a transition point for me to get back to work, and become productive.