Someone once said, "The only thing I can't resist seems to be temptation."
Bad habits, like allergies, can be developed at any time in life--whether it is compulsive internet surfing or impulsive shopping sprees. You need to beware.
First, watch out for ignorance. Second, watch for faulty thinking. They are self-delusions even though they are very comfortable. Third, watch out for temptation to pursue wrong. Fourth, pursue change of behavior.
Frankly, what I've just prescribed for you is not humanly possible. Even self-help programs use divine help as their first step in their 12-step process in overcoming addictions--one day at a time.
Bad habits are not only bad because they affect your body. They also affect your relationship with God. Since God is the only One who could help you with bad habits, you have to relate properly to him to win the victory, obtain the freedom from bad habit prisons, addictions and compulsions.
So, ask God to save you. He doesn't ask you to give up your badness and then come to him, for you simply do not have the resources to do that. All you need to acknowledge is your badness, and tell him that you want him to free you from the bad behavior and then come to him in faith.