If you are not in a cool and relax state of your mind much better not to play or not to gamble, the process inside you might be affected either you have fear inside or you already feeling stress to whatever reasons, it's better to play when you are in good state in mind where you can easily justify your actions.
It also gives you clear decision making as if you have set strategy, it will be executed without any hesitations. It's on how you take responsibilities to lessen the stress if you lose you can easily quit and move forward.
This is especially important if gambling is just entertainment for you, if you do not play to earn money, then there is no point in playing when you are in a bad mood or under stress. The best way to relieve stress is to go for a walk or travel and completely disconnect from other things, and if you continue to play at this time, then your mind will be in constant tension and you will not be able to rest and this will definitely not allow you to get rid of stress, or at least reduce it.
And even if one is playing to earn money it is not good to gamble under stress or bad mood because if peradventure the gambler incur loss it will increase the bad mood or the stress and I don't think if there are people that don't gamble to earn money because I do gamble to earn money even though I know it is very risky and not certain or guarantee. Walking away or traveling can actually relief someone from that state of mind but it will take a little time and I think the best thing to do is listen to comedies funny ones in that matter and no matter how depressed one is they will surely laugh and before you know it the mood it out and the stress.