How to get over someone who treated you badly?

I just got ghosted by my boyfriend. Haven’t heard from him in two weeks with no explanation. I was not treated well in the relationship but for some reason I still feel so sad. He was dismissive, yelled at me, called other women hot in front of me, and didn’t make any time for me. I hate being treated this way so why does his absence hurt? I just want to get over it because I don’t think he deserves any of my energy and feelings.
Or I guess alternatively, how do I gain some self respect? Lol

How to get over someone who treated you badly?
Post Opinion