I will try to give my two cents without using platitudes but it's difficult. I don't know if it's applicable to you, but it helped me.
Basically what I've learned is that you have to forgive yourself. Do so with the same patience you might extend someone else who was posting here about their past mistakes. I used to feel so much anguish remembering all the stupid embarrassing things I've done, and all the mistakes I've made with ex-friends. Sometimes it would just be replaying flashbacks and cursing at how shameful it is. But we're all human and do dumb stuff and we grow. The reason you might not be able to let go is because you are holding yourself to too high of a standard.
I used to have agonizing memories of things I did and I didn't know why I couldn't get rid of them, when everyone else from that time must have forgot a long time ago. I realized it was because I was angry with myself for my own behavior and never took the time to say "It's okay, I forgive you".
I've heard a tip to imagine you could sit down and have a conversation with that past self, treat this younger you as if they were your little brother or sister. What would you tell them about the mistake they have made? What were they going through at the time, how were they raised, what circumstances led them to behave the way they did, etc.? Most likely outside factors heavily influenced them, and you can undo that burden of responsibility you're putting on yourself.