The majot problem here is ...GUILT.
Guilt is something that everybody can experience when we are attached to the past and we think about it over and over again !
You need to understand that there is an obsession with you to think about the past. You are a normal person. Everybody has done something at some extent that when we think about it we get a sense of guilt. The difference is that we can control our thought away from the "guilty" thought and not associate it with guilt whereas you obsessively stick on it for certain reasons.
Overanalizing about the Past, distorts your Present and your Future in a negative way and it doesn't teach you anything.
You need to realise that even if you did things you feel guilty for, you shouldn't think of them. Accept the feeling of guilt as it is, this is what is, a real feeling, but stop thinking. You already got a lesson from that behaviour through a mechanism that is beyond your control Thinking and overanalizing about it will not teach you any lesson. Overanalizing about your past actions or thoughts, will not help you be the "nice", "moral" person you want to be. It will just add a burden in your life and believe it or not, overanaylizing about your past predisposes yourself to act in such a way in the PRESENT so that you feel guilty about it in the future. Overanalysing doesn't help.
Overanalizing about the Past, distorts your Present and your Future in a negative way and it doesn't teach you anything. It feels your mind with unnecessary thoughts that don't contribute to the real purpose of your life.
It would be good if you talk to someone about your past and the things that make you feel guilty openly as they come to your mind.