At my highest stress moments, I've always found exercise and nature incredibly effective at resetting mental traps.
Sometimes before a task (e.g. go for a run and don't think about it at all, then immediately sit down and start after getting home) and sometimes after a task interval (e.g. get to this point, stop, go take a long run and don't think about it at all, or just lightly turn more fun aspects of the problem over in your head).
Running has the nice combination of sunlight + nature + physical exertion + dopamine.
It seems to me to be a common modern misconception for many people that the body is separate from the mind, or somehow unimportant to stimulate, exercise, and keep healthy for it and the mind to be in optimal function, have mental clarity and to be at peace (vs depression and anxiety).
Truly from my experience and discussions with others this is the biggest single change many can make if not already consistently exercising, being active, getting out in nature (especially getting more sunlight to counteract Vitamin D deficiency which affects mood).
Nietzsche had much to say on this topic, the mistaken dualism of mind and body.
Sometimes before a task (e.g. go for a run and don't think about it at all, then immediately sit down and start after getting home) and sometimes after a task interval (e.g. get to this point, stop, go take a long run and don't think about it at all, or just lightly turn more fun aspects of the problem over in your head).
Running has the nice combination of sunlight + nature + physical exertion + dopamine.