Walk away... Also analyse what is that is tilting you.
Was it your own mistake? Shake it off, we all make them. Review the hand and look for what action you should have taken instead. This will aid in preventing recurrence.
Was it a suck out/bad beat? Accept that even with AA your gonna lose atleast 20% of the time, and this just wasnt one of them. You never "deserve" to win a hand. Although it can get annoying when you get suck out after suck out, but thats poker. And luckily the variance gods usually repay the favour at some point! Also the people making these plays are exactly who you want in the game, they will give you their chips far more often than you take yours!
Reviewing your session after tilting often helps because you see things in a better perspective once you have relaxed again.
It happens to all of us though, but by keeping a positive mindset and following the above certainly dramatically reduce both the frequency and cost!