It boils everything down to self-control but as you have said it's the hardest part as this is a mental game for us. There will be days that we truly hate gambling because of the money that we have lost and promise to ourselves that we will stop gambling for good. But then again, after just a day, you felt that your day is not complete without gambling and so you are tempted to go back. And then the cycle repeats again. So yeah, it's really funny and it sounds like a broken record but we as human, maybe it's really part of our consciousness that it's really very hard to quit gambling.
This is a common occurrence, and I've even seen it myself with friends. They'd said they'd quit gambling the previous week, only to return a week later, telling me they just wanted to have fun. The funny thing is, this hasn't happened to just one of my friends, but to several.
The temptation to gamble is indeed enormous, especially if we habitually spend time on gambling sites. I don't deny that this could happen to me, or indeed to anyone who gambles. The only thing that can stop them is yourself, by setting limits.