Please, please be kind to yourself. You KNOW the rational way to behave, but your brain has been rewired by years of living with this, and it does not change overnight (or possibly for a very long time) .
I left my emotionally, physically, everything abusive partner many times and went back, many times, even after he tried to kill me, and in the end he left me for a teenage version. If he hadn’t left me, I’d be dead. I am mortified, 25 years later, that I wasn’t strong enough to leave, and I will be til the day I do eventually die, but you did it.
TBH it took some serious work for me (look up PTSD EMDR therapy) , but meanwhile, take him off your phone? Keep a copy of the number somewhere if you don’t know it by heart, but otherwise, at least then you need to spend a few extra seconds putting the number in to make contact.
Do you have anyone in RL who can talk you down at these moments? Otherwise, do post on here, and someone will talk to you.
You need to form new routines, new patterns in your life, to replace the old. You also need help with this. Can you talk to your GP? Someone else who can guide you on finding support?
Worst comes to the worst, get into a hot bath, or watch a movie with earphones on if you have, so that again it’s a tiny bit more difficult to text/think about him. Sleep is also good.
Also, understand not blocking him everywhere, but block him everywhere. 