To deal with a panic situation during an exam, deep breathing, drinking enough water, and allowing yourself time to settle down might be helpful.