Miles Davis once said, "It's not the note you play that's the wrong note – it's the note you play afterwards that makes it right or wrong."
This is true, of course, for much more than music.
In high school, I once saw our theatre director approach the stage manager after a dress rehearsal. The stage manager was clearly upset, and expressed disappointment that she had only called about half the sound and light cues on time.
"So you're batting .500!" exclaimed the director.
In baseball, getting a hit every other time you step up to the plate would be a miraculous accomplishment (the average is closer to .250).
You're never going to be perfect, and that's OK. The goal is simply to hit the balls that you can and accept that you might miss most of the time.
And when you do miss – whether it's a ball, a note, or something else – just remember it's the next one that counts.