When you facing this problem then try to divert your mind on other areas, discussions, topics etc.... like diverting your mind to the last spend happy activities, or like situations while you spending time with your friends or relatives or diverting your mind to watching TV or playing games etc..... like that you try to divert your mind from such toughts.
As well as daily spend your time on Maditation for the time equal to your age. Assume your age is 20 then you have to spend 20mintues time for Maditaion daily. Because of Maitation most most help full to the human being in particular for now a days. It increases the streanght & Confidence of the pearson, avoids un necessary toughts and views and increases consentration power and don't get the divert from the topic we are concentrating etc.... more more benefits are available. So don't go upset atleast from this day you start Maditaion and don't think about your lost attempts and don't leave your confident. You should be be confident on you. So follow this and go with very confident to your exams you surely get the success.
Our beloved god's Blessing always with us. So don't go diappoint you will surely sucess in this attempt.
All the best.
OM SAI SRI SAI JAI JAI SAI