What we need to do is to have a very strong control over the money we use to gamble, this way regardless of the emotions you may be feeling at the time you will not take dumb decision with your money, while at the same time you are able to enjoy gambling as you should.
Heck if the gambler had control over that money they would not be gambling in the first place. Its because they are chasing a loss or following their greed that they try to make money like this and eventually lose enough to put them in the vicious cycle instead of accepting a defeat and moving on with the money.
There are people who have learnt this the hard way and those who never did, the first group have moved on to things that can actually make money and not gamble while the second group have gone down the rabbit hole.
So instead of being emotional about the loss, accept it and stop playing.