Catch yourself in the act, say there I go again, X. Even if you can't stop doing it right then, it is enough to give it a name. Lots of things get fixed right here.:)
Next time, say prayers, read a book, go for a walk, push-ups, just be ready with something to do instead.
Journal, why do I need X? What does it help me prevent/control? Who will I be without it? The answer is; Lord, you'll have to fill in some of these blanks. I'll do whatever it takes. Bring it. a coer valliant rein d'impossible
Kicking out your own crutch is hard. Grieve the loss of your crutch.
This is a good place to insert ceremony/ritual. Something to bless you and prevent yourself going backward.
You'll be amazed how fast this all goes. Pretty quick you'll be; wait, I see, God is amazing, suppose I had never found out....
3 things are hard: dimonds, steel, and to know one's self
You can do it!
(that last bit was Ben Franklin, of course;)