It's all mental. You have to know going in you won't always win, you will lose and sometimes you'll lose big, you have to be able to eliminate the $ signs from your mind and focus on playing good sound poker. You can't chase losses, you can't try to make up all your losses with one big swing. You have to trust the math and that as long as you continue to make the right decisions you'll wind up on top.
Poker is just as much a mental game as it is a numbers game. If you aren't sharp, if you're steaming over something that happened 10-15 minutes ago you're going to miss important information, important information that could climb you out of hole, win you a big pot, etc. etc. etc. Once a poker hand is done in the midst of action don't dwell on it for too long, maybe put a few notes in your brain on it but move on and pay attention to the current action. Then when you're done for the day or the session, go back to that hand, go over it, review it, ponder it. Could you have done something differently? You're in control of your own emotions at the table and that includes tilt. Don't let it get you.