I think I’m going crazy

I recently just got broken up with there’s a lot of details but i don’t want to put them. Anyways, it’s been kinda hard on me since we were together for 2 years. I’m going crazy. I wanna work it out and he just tells me I’m crazy and need to work on myself. I have been but it’s hard not to text him. I’ve suffered from depression and anxiety since highschool. I just wanna be ok and learn to be ok. It’s so hard.