I recently mentioned the Buddhist metaphor of the two arrows in relation to regret but the metaphor is relevant to all forms of distress.
As I wrote at the time: "If you were struck by an arrow you would be in pain, no doubt about it.
But if you dwell on that experience by going over and over it in your
memory or by entertaining revenge fantasies for years afterwards, then
you are shooting a second arrow into yourself."
Buddhist teacher Pema Chödrön says this, in Start Where You Are: A Guide to Compassionate Living:
“If someone comes along and shoots an arrow into your heart, it’s fruitless to stand there and yell at the person. It would be much better to turn your attention to the fact that there’s an arrow in your heart...”
(Yes, you would be dead if someone shot an arrow into your heart but this is a metaphorical arrow so that's okay).
Part of the practice of mindfulness is to be willing to experience the first arrows that come every day (let-downs, bad turns, cravings, pain) and to do what you need to do but without adding to them by cycling scenes and thoughts in your head again and again. For instance, you could practice returning your attention to your breath or to your surroundings whenever those old scenes start re-running.
This is easier to do if you have a formal mindfulness practice but even if not, you can adopt the two arrows metaphor as part of your approach to daily living.