mentally unstable after abusive relationship

I was in an incredibly emotionally abusive relationship for a year or so. He would constantly bring me down, blame me for his problems, threaten to kill himself, etc. He also pressured me into doing a lot of sexual things that I wasn't ready for, including losing my virginity. I finally broke up with him a few weeks before I turned 17, after he screamed at me in front of our friends multiple times. It's been a couple months and he's finally mostly out of my life, aside from classes, and I do not, under any circumstances, want to get back with him. However, I'm finding myself spiralling downhill. He seriously fucked me up so much mentally. I've been wanting to make all of these stupid impulse decisions, such as hooking up with guys I've never met or hanging out with people I shouldn't. It's as if I have some desire to just mess up my life, and I don't know what to do. I put my own depression on hold for a year to help him with his fucked up head, and now all of my issues are just flooding back and I don't know how to handle it. What can I do?