I can appreciate you wanting to make school a priority — and can understand why the low test grade was so difficult for you emotionally. Anxiety is a necessary element of performance. It operates like a violin string. If it is too much or too little we don’t aren’t in tune.
The counseling center at your university is used to that his type of reaction with students. They understand what it takes to perform well and can help you get the right balance back. I would make an initial appointment with them and let them know what is happening. They can help.
Wishing you patience and peace,
Proof Positive Blog @ PsychCentral