Feel like I cannot cope after heartbreak

Me and my boyfriend were together 4 years but I broke up with him in September because I couldn’t cope anymore. We adored each other and he was my best friend but he just put the bare minimum effort in with me and blamed it on his mental health or anything he could. His communication was so poor and he have a long distance relationship most of the time (I go to uni) and he could barely cope with messaging me more than once a day or ringing a couple of times a week.

I’ve threatened him with breaking up before in hopes that he would try to change and put the effort in but no matter what I’ve done he hasn’t fought for me and he still isn’t now. I know I’m the one who broke up with him but I just want him back so bad and I can’t stop blocking and unblocking him and messaging him going between being mad and being upset. I don’t know how to get out of this cycle. I want him bad so back but he doesn’t want to now and I know I shouldn’t anyway as the relationship wasn’t working.

I blocked him on everything for a few days then he sent me a poem on email and since then I can’t stop messaging him and he hasn’t messaged back once. Just need some advice on how to cope, to accept that it is over and how to move on? Everything feels so impossible atm I can’t go a couple of hours without thinking about him or crying. I miss my best friend so much and I feel so alone. For reference we have been together since I was 17 and I’m 22 now.