No, you didn’t deserve this and it was unfair. The thing is he’s not there and you’re still dwelling on it. He has most likely moved on, and if he didn’t that’s not your problem. The only person you’re hurting is yourself. Give yourself a break.
It took some work but I’m no longer letting people live rent free in my head who aren’t loving to me and vice versa.