How do I stop?

How do you stop replaying stuff? It's a huge part in my anxiety and depression and its killing me. For the longest I thought this was normal because I do it all the time for years I have replayed conversations, events, terrible things over in my head randomly. Ill replay it, think about it, it gets my heart racing all over again, idk how to explain it but its mentally exhausting idk what to do anymore 😕 im so tired of being sad and anxious