It's a trick I learned from Sherlock Holmes.
When I have a really hard problem to solve, or a really stressful situation, I mentally withdraw to a safe place. A space where my mind can be clear. I call it my "Mind Chapel".
It really helps. By the time I've dealt with the theft of the mind-lead on the roof, started a mind-appeal for the mind-organ and found out the mind-oil-fired-boiler is on the blink - I've totally forgot about my real-world problems.