I agree with the two comments above that you need something good to replace the bad habit. If not, it is very hard to break it.
Also, to form a habit takes repetition for a number of days. I have heard 2 weeks, or 30 days. The beginning period is hard, then it becomes routine. So form a new good habit to replace the old one, and stick with it for 30 days until it becomes easy.
But sometimes bad habits are due to self-destructive feelings deeply rooted in the soul, due to not being at peace with yourself. If this is the case, you need to deal with the cause of these feelings. I my experience, to resolve this you need to receive God's forgiveness and know that you are forgiven. Ask God to explain this to you. Knowing His true forgiveness will give you deep joy and peace deep in the soul, that enables you to overcome and let go of the self-destructive behaviors.
So replace your bad habit with a new habit that provides a benefit.