Poker is relaxing and a stress reliever for me. Proper
bankroll management also reduces stress. Don't play above your limits.
Proper bankroll management makes it easier for you to concentrate and not worry about breaking your bankroll if you lose.
Then you can analyze your wins, losses, and mistakes, then move on.
Don't focus on an opponent or a bad beat, or how bad an opponent may have played a hand. You can't control how another player plays or their attitude, only your own.
I find all of that helps reduce tilting.