How do I avoid relapsing into a past attachment ex!

So, i’ve been in a toxic relationship with my ex boyfriend for over a year. my entire life was revolved around him to the point where i cut everyone off and only spoke to him. the relationship was extremely toxic, i knew he was terrible. he was a liar very manipulative but i was attached to him so it was hard to let go.

Finally, i completely cut him off in the start of january this year. he texted me today and so many emotions are going through my head😩 It’s really hard for me to not to respond and it makes me so mad because i have been fine and have not been worried about him for 3 months! and one little text just makes my heart drop and threw me off. what should i do to stay focus?