Don't go to the ATM. If you don't have the self control to not do that, then leave your bank cards at home. Go out gambling with a set amount of hard cash - if you run out of cash, and have no bank cards on you, then you have no option but to go home.
This is the best way to control your addiction. The first time I went to the casino I have my bank card with me and I couldn't resist to make a withdrawal after losing my initial fund. Next time, I realized that going with a certain amount of cash in my pocket (the one that I can afford losing) is the best choice I had. Winning or losing will give you some fun and high rates of adrenaline, then it's time to go home.