My ex is a cock sucking two balled bitch

So yesterday I went to a play with my drama class at school and one of my ex's is in that class, but we don't socialize like, ever. So there was a really hot guy in the play so after the play I was walking with a friend and my ex and his friend were nearby and I was saying "omg he was soooo hot like 10/10 I'd smash" and my ex (david) said "you know what else is hot? when your beat friend uses your ex for sexual things" then started laughing. He said that because his best friend asked me out just for nudes then dumped me so it relates. I was shocked but I said "What the fuck is your problem, david? you're a bitch, get a fucking life" Then he called me a thot and I was kinda in shock because idk. So when we got back to school I waited for him to get off the bus then asked him "how the fuck am I a thot? and he shook his head laughed then said "dumb whore" that really broken me down. because it's like 'wow okay, my ex just called me a whore. whatdoido?' and he sits with the guy I like at lunch (which is his best friend..) and they always talk about me and I can hear them saying my name. And today after 3rd I was walking outside and he was walking with a friend and his friend said "hey Elizabeth" and I said hi but really quietly then he asks why I'm always so quite when I talk to him, but I just walked away. I don't know what to do because now I have to be near him for class so I barley talk because im scared... and before you ask I'm sacred because when we dated he pressured me into doing things I was uncomfortable with. And I don't want to draw attention to myself because after we broke up I cut myself and he called me an attention seeker. But it wasn't just that. So I'm just really confused, I need help