It's because you're not focusing on the task. Pictures are flashing into your brain so fast that you might not even realize it. In these pictures you're visualizing making a mistake, and the people around you laughing, pointing, looking confused at what you're doing, judging you, etc. You're also having self defeating thoughts like "I can't do this, I hate this, why do these people have to be watching me, I'm going to screw up I know it."
With all of this brain chatter, between the mental pictures and the defeating self-talk, you're not even paying attention to what you're doing. You're too busy imagining possible disasters, remembering times that you made mistakes, and telling yourself that you can't do it. All of this might even be subconscious and it will just feel like your mind is going blank.
So what can you do? The first step is to recognize these absurd, paranoid thoughts. Become aware of the thoughts. BREATHE! I know you've heard it before, don't blow it off because it really does work. Become aware of your breath, take in a nice deep, smooth comfortable breath. Distance yourself from the thoughts, like you're a scientist simply observing. Let those negative thoughts pass. Don't fight them, just accept that you had those thoughts and let them pass. Pay attention to what you're doing, and if the negative thoughts show up again, repeat the process.
1. Recognize that you're having paranoid thoughts.
2. Breathe. Deep, slow, comfortable breaths.
3. Distance yourself from these negative thoughts. They are not you. They are your past haunting you.
4. Accept that you are having these irrational thoughts. It's okay.
5. Let the thoughts pass. Don't try to fight them. Just breathe and let them pass.
6. Pay attention to what you're doing.
This will work, but you have to make the conscious effort to DO IT. Ram this stuff into your brain over and over, and eventually you won't even have to think about it anymore.