"A nail is driven out by another nail; habit is overcome by habit." Erasmus.
Have you ever tried to break a bad habit and been really shocked by its aggravating resiliency? Habit is like a second nature. We breathe by nature. We do many other things by second nature, or habit.
Without habit, we couldn’t live. Life would be far too complicated if we had to always go around figuring out what sock and shoe to put on first in the morning. We have habits to make life possible. But the wrong ones quickly make life miserable.
How do you break the power of a bad habit? First, by the power of the imagination. You use your imagination to picture vividly where the bad behavior is taking you, envisioning the disasterous results as luridly as possible, and then picture just as clearly some alternative behavior and its contrary, great future. Then you act to establish a suitably contrary habit. No one finds it easy to just stop some form of self-destructive ineffective behavior that has become habitual. Bad habits are displaced by better habits.
Let me say that again. Bad habits are displaced by better habits.
If you need to make a change in your life, use the wisdom of the great Rennaissance thinker Erasmus. Take a new nail to drive out the old one. Work at forming a new habit that will displace the old and still serve whatever positive purpose the old one did, but better, and without the negative consequences. Use your imagination. And get moving.