Don't panic - Try to find somewhere quiet and calm down there for a while. Remember that it is only one exam in your whole educational career.
Talk to other people - Talking to others can help you ascertain whether it was a paper that everyone found tricky or whether perhaps it was just you who had a bad day.
Accept the Situation: It's okay to feel disappointed, but dwelling on your disappointment won't change the outcome.
Seek Academic Support: If you consistently struggle with exams, consider seeking academic support from your school or university.