I feel like I did something morally wrong and I can't forgive myself for it.
I'd like to know more. What did you do that you think is immoral?
I went to an ex-girlfriend's party when she told me I wasn't allowed there.
You're right, what you did was immoral. If someone doesn't want you to be there you should respect their wishes. It is best to be nice to people.
You're right, what I did was awful. don't think I'll ever forgive myself.
While what you did was wrong, I don't think it was so bad that you shouldn't forgive yourself for it. You realized your mistake, and are trying to learn from it, and that's what's important.