This is rumination and is often a symptom of depression. I recognise it well because I suffered terribly for years, locked into regret, self-hatred, self-loathing and guilt from which there was no escape. I was convinced that, if anyone could see the 'real me', they wouldn't want to know such a dreadful, sub human specimen as I was.
I tried every trick in the book NOT to overthink constantly but my tired, sick mind wouldn't let me. It was torture. The only respite was sleep, if that ever came. On waking, there it was again, combined with anxiety, envy of those contended enough to enjoy life, horror of the future.
I had years of therapy but in the end, for me, it was the right meds, and time, which made the most difference. At least, I think it was. All I really know for sure now is that for the last few years I have felt lighter and more alive than ever before. I get my down days but I am able to live the moment far more, appreciate what I have and I don't look back nearly so much. I still feel guilt -and believe me, I have things to feel guilty about - but I am not that person I was, I have learned, I try to make amends. Sometimes our actions are borne out of lack of thought, and simply because we are human. It's because you, bee63, are a thoughtful and sensitive person, that your thoughts torture you so much, but you can and will learn to forgive yourself, treat yourself with kindness and compassion, accept what has been and turn your face forwards.
Are you able to visit your GP and explain how you are feeling? Meds aren't for everyone but they might help you over a difficult patch so you can benefit from some counselling. If you are feeling very low much of the time, you might struggle to get the best out of any therapy or help.
Learning self-love, self compassion and acceptance are key to being able to move out of your pain. I hope you can find the help you need and I wish you well.