The success in the deliverance from addiction of any kind is directly related to how much dependent wants to be open to the work of the Holy Spirit in his life
For this purpose, first of all, we must recognize that your addiction is a sin before God. Sin is not because you are ashamed (or being condemned or your health being deteriorated), but because the Lord said so in His Word.
"Or don’t you know that the unrighteous will not inherit God’s Kingdom? Don’t be deceived. Neither the sexually immoral, nor idolaters, nor adulterers, nor male prostitutes, nor homosexuals, 10 nor thieves, nor covetous, nor drunkards, nor slanderers, nor extortionists, will inherit God’s Kingdom." (1 Cor. 6:9-10)
"All things are lawful for me,” but not all things are expedient. “All things are lawful for me,” but I will not be brought under the power of anything." (1 Cor.6:12)
Then we need to repent in our sin and believe that the Lord gives us freedom. This is made possible by the intersession of Jesus Christ, who died for us in agony on the cross and shed His precious blood for us. Please, learn from the Word of God, the way God wants you to be.
"Or don’t you know that your body is a temple of the Holy Spirit which is in you, which you have from God? You are not your own, 20 for you were bought with a price. Therefore glorify God in your body and in your spirit, which are God’s." (1 Cor 6:19-20)
Read the Word of God all the time. Let It does not depart from your eyes. Plunge into the Word, learn verses about your situation by heart and speak them out loud. Proclaim the Word of God, so that faith could arise in your heart.
Get rid of all things that trigger you to sin, separate from those people who "pull" you back to the life of sin (do not regret about it, God will give you the best!). When it comes to the desire to sin, direct your mind to God. Pray to not think about sin.
With God's help, you are able to overcome any addiction. You are only to make a solid decision to resist any temptation.