Actually, I am not one of the heavy gambling addicts because until now I can still control my emotions in gambling activities by setting limits on the use of money every week. But I really find it hard to control the urge to quit when I still have something in the account and quite often before that I had to leave empty handed with no results. The bottom line is that we all have different levels of difficulty dealing with our emotions and controlling them when gambling and I know that each of us has different gambling habits. But as long as it's not a problem and doesn't cause any problems, I think it's fine.
Best way to do that would be to betting it at all-in games. So, let's say you want to quit, and you have 20 bucks left, then just wager 20 bucks one something and you will most likely quit after you lose that, if you win then just keep repeating that until you have an amount that you are willing to take out and that way you could quit. Similar thing happened to me on a sportsbook once, I wanted to quit and I wagered 60 bucks on a bet and got 710 bucks in return, I imagined I wouldn't guess all the games correct but I somehow managed to do it so I stopped because I wanted to take out that 710 bucks out of there.
Of course, a few months later I started again on another place but at least it helped me for a while. If you have too much money then it should feel a lot easier to take it all out, if you have a lot less just wager it all away and stop.