I know how you feel, it will take some time to feel better but eventually you will feel alright. It's hard cos there's nothing you can do about it now but wait til results day and you might have done better than you thought, if not, you can always resit it, there's nothing wrong with that. As someone said, learn from the mistakes, whether it be nerves/timing/insufficient revision etc. Learn from it and don't repeat it for the remaining exams.
So I would say, learn from your mistakes and try not to let it happen again. Concentrate on the remaining exams. Don't let that exam you feel bad about ruin your motivation for the exams to come.