You've all felt this at some point. You're in front of your teacher (oh god, they're judging you!). You've practiced all week (hopefully) but now your hands don't want to work. All you can think about is the hard part of the song 30 seconds down the road. Then it happens...
Ah, yes. The "wrong" note. Everything stops. You give up. You've "failed." Why even bother?
Before you beat yourself up too bad, ask yourself this:
Have you ever just listened to the "wrong" sound by itself? Have you ever gone back to the "wrong" note and asked yourself "did this actually sound bad?" Are you listening to the overall sound or are you just hearing that you messed up?
Do yourself a favor; the next time you make a mistake, go back and play that mistake again. Play it 20 times! Ask yourself each time: "Does this sound bad?" You might surprise yourself with how often it doesn't sound bad at all!
"It is egoless listening that tunes you into the music."
- Kenny Warner
Now, don't get me wrong. Your goal is to play the song. That means playing the parts the way the musicians played them. So, yes, you played something incorrectly. But think about how the stress you're inflicting on yourself is affecting your playing. It comes off stiffer, your hands are cramping, and the phrases don't feel as good. Good musicians will pick up on your stress more than anything. And although you may have only messed up one minuscule part, the whole song suffered because of something that the audience probably didn't even notice.
Alternatively, there is an argument against learning anything "note for note." And while you don't want to let yourself get too upset when you hit an occasional wrong note, you would be inhibiting the learning process if you werent trying to get the song down as it was originally played.
I'm not suggesting you play everything wrong and not push yourself to improve when you come across those stressful moments; I'm simply suggesting that you objectively listen to the sound you produce, notice that even the "wrong" parts don't sound bad, let that mindset help you relax and most importantly, enjoy it!