By playing, you can earn money or win good times while enjoying the game, and in some cases you win both !
In my opinion, once you feel uncomfortable with the game and more you're losing your money, so it's time to leave the game !
The right time to leave the game is the time when you are thinking about trying gambling for the first time, it is not the right thing to do, and that is the thing that you should realize. Gambling is a very risky game, and there are people who are winning on this, but it doesn't mean that it could be applied on you, or you could try it because you wanted to be like them, NO, don't be like this, it is being an immature who is getting insecure on to something that is not that worth to try.
It would be better if the money that you are going to win or earn is from something you really work hard, from something you are going to be proud to say that, "hey mom, I'm now earning money and I would like to help you on the expenses on our everyday living".