If your "bad habit" does not violate the rights of others, then allow yourself the faith and freedom to "judge not". Therefore, you have a habit that you would like to transform. Denying your need does not transform it. Set goals to indulge your habit less. Make choices to do things with your life that are in conflict with your habit. Consider what you enjoy of your habit and how you can experience similar results from different activities. If you are spiritual, turn the creation that you are, including things about yourself you don't understand, over to that which created you and does understand why you do the things you do. Affirm your surrender and faith in your creator's ability to raise you past this habit, but also to accept your need for the habit and its function until something else can be developed to fill this need. Be prepared to feel lost and mourn the loss of your habit, once it passes. I have a habit I've had for 30 years or so, and it has gradually subsided. It was never an event, where one day I just stopped. I may have denied it a while. But now, with enough time having passed and enough surrender attained, I go most days without indulging in this habit. And I still miss it. But when I go back, and try it again, it is not the same. I have not yet found its replacement. I just have just feel less guilty or afraid of being found out. NOW. If your habit violates the rights of others, you should get help to stop immediately and once you have done whatever it takes to stop hurting others, then allow yourself to "judge not."