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.
Do not ever play all your money and just set some amount on playing gambling so that you can't lose all your money. On the other hand, do not be addicted on playing gambling and just play for fun and you should controlled yourself especially your emotion. If you do not want to lose a lot of money you should start to quit now and played gambling.