Why even think about failure in first place? I never thought of and never think of failure while working or studying.
You should train your mind to think about success, getting more marks than earlier, getting appreciation from your loved ones.
To achieve all these, study regularly, revise on regular basis, keep progressing on daily basis and you will see that you have achieved lot more than your expectations.
Just keep doing your job sincerely and leave rest on Almighty. Finally, be content with the result you get and keep moving on in life and keep improving.