Pwll: I expect we all have different ways of dealing with these times, my way is using my sense of humour. I can laugh at most things, so that's what I do; it's unsurprisingly effective for me.
Other people take a step back from the tables for a break and some people can say, 'Pfff, variance!' and carry one. No doubt there are as many ways to deal with tough times in the game as there are people playing.
Do you have a particular methodology you use at all? I would expect people to reference Jared Tendler et al books but they're not for me.
Funny you say that I'm about 3/4 through one of his books (Mental Game of Poker Vol1) and I do recommend it. It's certainly helping me. My entire attitude towards playing and learning has changed.
Like you say, humour is a great way to control your emotions. Most of the time I can and do laugh it off. I find I'm better in tournaments, I can laugh off busting out when my Aces are cracked by K8o, but in cash games I'm way too results oriented. Losing a stack, especially early in a session, can really affect my play. Getting better but a long way to go.