Just relax, sit down and analyse the reasons behind your failure.
Jot down all the points that you feel has let you down in the exam
Prepare a checklist. Start working on each of these negative points and strike off the same from the list . That which seemed a herculian task for you to correct will start getting lighter and lighter as you work towards reducing the number in the list.
Some tips which can help you:
1.You can have group study and take the help of a mentor, say a senior in your college who can guide you properly
2.You can request additional help from lecturers in subjects you are weak.
3.If the ambience at your home distracts you, you can always opt to study in a library. With lot of books at your disposal for reference, you will be able to tackle the challenge easily.
4. you can refer to model papers, previous question papers and take mock exams several times before attending the main exam
5.Try to do meditation as this greatly improves concentration.
6.Analyse the reason for your lack of concentration. If friends are constantly disturbing deal with them forthright.
All the best