For addicts, religion or saying and thinking about life in religious ways and mantras, work surprisingly well for beating the addiction. It's difficult for me to say it being a "hard-core atheist", but this is something I've seen from my close ones. Of course, now in my eyes they have another problem, but it's not substance addiction anymore.