You know what they say, you win some and you lose some. This will serve as a lesson but at least your not that kind of man that would rage because of losing. Although for me, I would instantly stop if I at least see my profit from my gambling since I'm not a high roller. Some guys are only playing to waste time and some people are playing because they wanted to earn.
Nobody will want to gamble to waste his/her time, if they can predict the future and know they will lose, then they will not gamble. Many people or most people that gamble play because they want to earn. But in the process when someone has lost already, he needs to just stop gambling at that point because he will be filled with bad/poor mindset that will be tempting him to gamble the more, and this is the period people are more vulnerable to losses.
The temptation of gambling will attract him to still playing gambling, especially if he losses the money. When someone doesn't have the power to control himself, he will still play gambling without thinking about the side effect that he can get. If he plays gambling from a long time ago, I don't think that he can directly stop gambling for a while to rest because the passion of curiosity will be there, making him continue playing gambling. The other thing that can make him continue gambling is because he wants to recover his losses before.
Perhaps, that is why we need to use gambling to kill time if we don't have another thing to do. Playing gambling is no problem for us, but we need to know when to stop gambling, so we don't lose more money. But don't even think to recover your losses because that will be too difficult.