I feel so bad about myself, I cheated on my girlfriend.
Really? Why would you cheat on your girlfriend?
I thought she was cheating on me so I cheated on her, but now I feel bad.
It's good that you have a lot of remorse for what you did, and that you are able to feel the same when your friend did the same to you. Cheating is disgusting and I hope you don't do the same thing again.
I hope that I don't, but I'm not sure if I can prevent myself from doing it again.
Since you feel remorse, remember how that feels if you ever think about cheating again. It's a betrayal to cheat on a partner and it feels terrible for both parties involved.