Here's something that happens a lot:
I'll be sitting back in my chair, listening to a piano student play. Sometimes I'll even close my eyes and enjoy the sounds as they wash over me. And then, the piece will come to a beautiful finish only to have the student shake his head and say "that was terrible."
(Fortunately this is happening less and less as my students learn to enjoy their own playing more, but it does still happen to pianists in general.)
So what exactly is going on here?
Fact #1: The student played well and the music sounded good.
Fact #2: I genuinely enjoyed listening to the music he played.
Fact #3: The student didn't think the music was "any good."
Sometimes there's a huge gulf between the listener's experience and the performer's experience. The listener had a great time but the performer didn't. Why not? The answer has nothing to do with how the music actually sounded! (And in case you're thinking that the pianist is simply being a "perfectionist," no; this attitude works against not only their mental health but their musical development as well.)
Even though the music sounded good, he didn't think he played well. There are many reasons why this may be so. He may have played one wrong note and became overly self-critical for the rest of the performance. Or he may have felt unprepared even though it was indeed "good enough." Or he may not have been able to enjoy the performance because he was too worried about what I as a listener would think.
Have you ever seen a young child draw a beautiful flower and exclaim "Oh, that's no good!"? It's the same thing with the piano. Most of our self-criticism has nothing to do with what's actually happening with the music. The music sounds great, but something in us is interfering with not only our own enjoyment, but with our perception of what's actually happening.
And that's not good.
If you think that playing perfectly would make you happy, think again. First of all, you'll only enjoy 1% of your performances and this alone would be enough to drive yourself crazy. You'd be unhappy 99% of the time. And secondly, it's a limited goal. Real "perfection" is not just about the notes. It's about making yourself and your listeners happy. It's about enjoying the process of playing music, and it's about seeing your own progress in relation to your overall development. It's not just about being "note-perfect" at all costs. It's much bigger than that.
If you play 98 good notes, don't worry about the 2 that don't sound so good. Just smile and move on to the next 98 good ones.
Let me be very clear here: This is not self deception. It's reality. Learn how to enjoy your playing as much as your listeners do. When you're able to do this, you'll be much happier and yes, you'll find yourself playing less wrong notes as well!