Heartbroken about an unhealthy relationship?

Emily
We were together for a year and a few months. He broke up with me a day after my birthday. He didnt do anything for me for my birthday so I told him how that made me upset and he just went off saying how I am just "extra stress" and that he doesnt want a relationship and then said "lets just end it" right over text. Towards the end he was distant and never asked to hang out. Now that I look back I am really looking back at it the relationship was not healthy. He has cheated and lied and I was dumb enough to stay. I don't know why I have been so heartbroken even though he has treated me so poorly. He was my best friend before and I still want him in my life even if that means we aernt dating. I dont know what to do all I have done is cry and cry:( I just wish this would all go away and I was happy.