(Sorry if my english is a bit wonky, It's my second language)

I don't think I have the strenght to describe everything in detail, buuuut long story short I didn't do well today during an online course I'm taking, and it made me so ashamed and freaking scared of the future for no reason. I suffer from social anxiety and think way too much about the way I talk and stuff like this, and a spiral of thoughts like this hit me and I just couldn't focus and started muttering. I'm under a lot of pressure and have to study all the time rn, and I feel very guilty if I give myself a day off. I try to stay positive and repeat to myself stuff like: 'don't underestimate your abilities' 'you have to stop automatically thinking of yourself as lesser of a person than everyone else' but sometimes I can't control it and it's so frustrating. When I do well I'm nearly jumping from excitement about how all this studying is finally paying off and I'm much more confident (for a while). It's just sad how easily I can lose hope when something doesn't work out, based on my mood. During these moments of weakness knowing that these negative thoughts make no sense make no difference. Would you have any advice on how to deal with something like this? :(