What usually works for me is taking a moment just before exam when you are sat infront of the paper, just take a breath, clear your mind and go "okay, here we go...."
Luckily I am not particuarly prone to panicking, I can usually blank that sort of stuff out, but taking your time and just...