Inspite of being a newbie in poker I've already faced such difficulty as tilt, that's very desparate when your opponent has 2 outs and he hits them on the river, but still if you have some chips left behind your back, just follow advice of Negreanu:
"Just say to yourself how damn bad you feel about this situation, how irritated you are, try to describe the situation and your impressions as detailed as possible. Then pull yourself together and get down to bussiness again." I've tried it several times and somehow magically it helps, but try to be as genuine as possible with yourself, don't avoid talking aloud.
Good luck for you and its whole abscence for your opponents who are waiting for emergency exit on the river!
Sincerely yours,
mrpolyglott
from Russia with love!