I stick to a monthly budget. Let's say I alot 5% of my income to gambling. I just need to make sure that it will last me for the whole month so I won't need to take more money from my income. It takes discipline. And another thing, never try to chase your losses.
I think 5% of monthly income is the upper limit for what one can afford to lose in gambling. Some people say that 5% is too much and that it's better to not gamble at all. But let's be realistic. We can't live without a passion, or a hobby, if you will. We can't be thinking about saving money all the time. Sometimes we have to relax in order to work more effectively later, and 5% is a reasonable price for that.