I can only echo the sentiments of the above posts.

IMO, bankroll management is the key to avoiding tilt.

I'd been playing at $10NL, well within my broll and not giving two hoots whether a donk nailed his gutshot on the river to crack my set. I just reloaded and got on with it.

I stepped up to $25NL (within my broll again) got spanked, and lost the plot when the 4th bad beat in an hour hit me.

I now plan to have at least $100 over the necessary broll before moving up limits again.

If the beats don't hurt your roll too much, they don't hit you as hard emotionally. That's what I have found, anyway.