Getting free of addictive, compulsive habits and behavior is something that can either be done by the power of the Holy Spirit . . . or . . . by the power of the very demons who so often cause it. A great trick of the dark side is when they entice and cultivate some sinful habit or sickness . . . and then, if the person seeking to remove it goes the way of occult healing, they will remove it as if a healing has been done. They do this to draw the victim even further into faith and reliance on the demonic realm for sustenance and empowerment.
All forms of self help, self will, self empowerment detached from Biblical truth and communion with the Spirit likewise go this way. This is why "12 step" programs such as Alcoholics Anonymous, Narconon (Scientology based, btw), and especially "Celebrate Recovery" are so dangerous. They have the program ahead of the Gospel and God and become a form of idolatry.
Rather than become steeped in these programs' methodologies and philosophies, the seeker ought be being steeped in Biblical truth and be in association with other Believers. A true disciple of Christ ought not be "forsaking the gathering of the saints". Fellowship with other Believers and immersion in God's Word are critical to successfully escaping the clutches of habitual sinning.
There is no magic bullet to defeat such sin, although sometimes the Holy Spirit will instantly relieve you from a besetting sin, though this appears not to be the norm. Rather, it is usually an ongoing process, including ups and downs, stumblings and fallings, but always overall moving forward to freedom from oppression. The one who has faith in God and trusts God above all is willing to forge on, however long it takes, grateful for every inch forward and resisting the temptation toward resentment and anger and impatience with God.
The enemy will constantly be pressing you to give up altogether and go off alone, wandering. Shaking your fist at God and then turning your back on Him and His servants and fellow Believers is what the enemy wants you to do. And if you do, your condition will invariably become many times worse. Oh, there will be some temporary relief from the stress of "trying" and struggling against your sinful nature . . . but before long you will be suffering from even more bad habits and all of them worsening.
If you claim to love and seek God and the Truth . . . and you really do . . . you will fight. You won't give up. You won't turn your back on God. Or, if you do, you will always keep coming back, as He Himself will again retrieve you from the mire and will draw you once again to take up the battle.
If you persist, time after time of failing and falling, to yet seek healing and freedom in Christ, He is faithful to deliver you. If you love God and truly want Him above all . . . you will not quit. You will trust that He will, in His own time, begin to clean you up and carry you along the route of progressive sanctification. I know this from His Word and from personal experience.
"Rejoice in hope; be patient in affliction; be persistent in prayer." --Rom. 12:12
"Blessed is a man who perseveres under trial; for once he has been
approved, he will receive the crown of life which the Lord has promised
to those who love Him." --James 1:12
"Let us not lose heart in doing good, for in due time we will reap if we do not grow weary." --Gal. 6:9