If you have a bad habit or an addiction and want to change it, the best way to do it is to switch it to something else.
This is a bait and switch that works and has worked for me more than once.
I traded smoking for running and treated myself to the best food I could afford to reinforce my running habit.