Can't help myself

I need help. I am addicted to texting this guy I like who, btw, doesnt like me back. Although he ghosts me, I cant stop. It is easier said than done. I regret it every single time and yet I cant learn the lesson. Please, please, share some strategies on how to ignore this impulse. Dont judge me and if you cant help it, then, please dont write anything. Thanks!