Patience is key here. If you're still feeling like shit, please do some gentle breathing. Make sure it is gentler than the automatic normal breath or else your body will actually become more stressed out.
In terms of your situation, the way to fix it will be over time. It is not overnight. The human brain is an echo chamber of everything you have ever learned in your life time, and oh, don't forget: as a survival mechanism, our brains are much more focused on the negative by default. In days where people were a lot more barbaric, a sad monkey was an alive monkey. Now, for your echo chamber, let's look: you've probably been in an abusive household or maybe even relationship where someone made you feel like a horrible person. You were constantly reminded of it so over time, it's filled in your echo chamber because you've seen that statement/"proof" of that statement a lot. It takes a while to get rid of this echo chamber. This echo chamber tends to be filled with thinking mistakes mixed with abuse.
I great thing I like to refer to is thinking mistakes. Search it up online. There are a lot of examples. But for example, when I see some of your troubling thoughts... let's counter them.
"I'm a horrible person"
You're generalizing your entire sense of being into one label. Is that really reasonable? Is anyone in this world all good or all bad? Or are we all a mixed bag? And what does bad even mean? What does good mean? And what does horrible mean?
"I deserve to suffer"
Why? What would be the purpose to suffer? Why would this be reasonable? Does punishing yourself help you to become a better person? Look at the prison system: people who get "punished" are very likely to go back into prison, at least in the US. If punishment was a good and deserving system to deal with bad people, wouldn't it purify the prison population? Or is it therapy or practices that encourage love and empathy and understanding that make people become "good" people? "Prisons" in other countries that are focused on rehabilitation instead of punishing the offender actually end up having way more success. Does anyone deserve to suffer?
"I have done these situations in my life and because of this, am a horrible person"
Let's think about it: you can probably think about how many embarrassing things you have done in your life. But can you list that many about anyone else? Exactly. Everyone remembers all of their embarrassing moments and forgets everyone else's. We are all very self-centered and absolutely no one is thinking nearly as much as you as much as yourself. And if being not being perfect is bad, then why do schools exist? If everyone is already supposed to be perfect, why would there be an entire schooling system to educate people? It is because people learn throughout their lives. No one is perfect or knows how to live life perfectly. Everyone has a ton of embarrassing situations, but you don't know because you've already forgotten about it!
And also, think about it. I hope you have played the Sims 4 because it could make it easier to understand here. Imagine if you had a sim that had an action of, "Feel bad thinking about things done in the past." Time ends up running and after the Sim finishes thinking, basically nothing happened. What's the point at what I'm getting at? There are three ways to move along in this world:
1) Change your mindset and core beliefs
2) Take action
3) Emotional relief: like for example, gossiping about someone who hurt you (Has a tendency to loop until you forget about it)
You're in the emotional relief part right now. You're just stuck in a loop. Your mind thinks it is doing something by thinking and thinking and thinking even when it does absolutely nothing. After you're done thinking, you're still in the same position. So go up the tier list. Instead of doing emotional relief by looping negative thoughts and tricking your brain into thinking it's doing something when it's not, try and reframe your mindset (catching and countering thoughts as I just did above) and taking action to make yourself feel like a better person. THIS REQUIRES PATIENCE. You will not catch every thought 24/7 because humans are very automated creatures. We love habits. And that includes the thoughts in your head. So it's going to take a lot of effort to keep countering these thoughts as they come, but you will notice change over months and years as you heal. It requires a mindset of, "Is this really true?" and taking every thought in your brain with a grain of salt. And it's fucking exhausting. But I've seen improvements over months and years.
A great way to reprogram is by saying affirmations every day. Devote 15 minutes every day to saying thoughts that counter the thoughts you typically have and try to say them and convince yourself that they're true. Ofc, it will be hard. But over time, if you blast it in your mind every day, you will see a difference.