I can't say that I know experientially how to beat an addiction. I don't have any chemical addictions (excepting perhaps caffeine - and I have no plans at this point to fight that one).
However, I do have some experience with something that looks very much like addiction. In fact, it may be the ultimate addiction: I have been addicted to sin.
I am continually bombarded with lusts and desires. I know they are wicked and terrible and bring nothing but death and destruction, but nonetheless I desire them and many times act upon those desires. My friends, this is part of the Christian experience (1 Peter 2.9-12, Romans 7.7-25).
"Like a dog that returns to his vomit is a fool who repeats his folly (Proverbs 26.11)." Such is the experience of the sinner and the addict. In fact, it is an addiction to sin that brings addiction to chemicals, sex, gambling, or whatever else. So how is it beaten?
1. Core desires are changed.
This is what happens at conversion - I am freed from sin and freed to be satisfied in something greater than anything else: Jesus Christ. He is glory, and He is joy (2 Cor. 4.3-6, Psalm 16.11). It is here that the ultimate power of the addiction to sin is broken.
I am told by my friend, a past addict, that something like this happened for him in regard to drugs. The temptation still came around, but by the grace of God, the powerful hold broke, and his core desires were changed.
It is key to realize that a desire like this needs to be replaced with something else. And Jesus is the ultimate replacement. In the light of His glory, all others fade.
2. Practical steps are taken to ensure, as much as possible, that incoming temptations are defeated. This includes:
A. Removal from tempting circumstances and people.
The recovering alcoholic should never be at the corner bar with his drinking buddies. This is part of the reason rehab programs take people out of their normal surroundings. The addict isn't prepared to handle it.
B. Strong accountability from trusted sources.
Those fighting sin and addiction need to be known and confess their sins and habits to those who will confront them, support them, and help them reach a higher standard. We cannot do this alone.
C. Serious prayer and word. Our lives are transformed by the mercy of God through the renewal of our minds (Romans 12.1-2). We are in desperate need of the Spirit of God changing us through His Word. He can and will do it for His people.
Pray for core desire change. Pray for a renewed mind. And take practical steps to make it happen. I don't mean to pretend this is quick, simple, and easy. It isn't. But by God's grace, it is possible.