As mentioned earlier Kenny Werner nails this phenomenon in his book Effortless Mastery.... One thing he says, among others, is that by disassociating your sense of self worth and fulfillment from your playing, you will actually perform better, because much like in your home, it wont matter if you play well or not. For many musicians, when in a live setting, the mind games start; will i play good, I had a great gig last night so i need to be better, what will so and so think, etc, etc all of this counteracts the natural state....
Wow, I sure can relate to this "psych myself out" loop. An anecdote:
A little over a month ago, I got a call to sub for a different band than my current gig. I had a week to try to cram about 70-80 tunes, their entire song list, as they work completely from audibles. I knew maybe a dozen...different genre than my background. So I went down to the gig and did the best I could, expecting it to be rough around the edges. Kept my ears open and eyes on the others, and my intuition served me well even though I didn't know the songs as well as I'd like.
They were really happy with what I did, and said they'd call me if they needed a sub in the future.
Several weeks later, they called and offered me the gig on a permanent basis. I accepted it, and gave notice to my current band.
The first gig with the new band was a side project backing a name country singer on a TV appearance, on the morning show of a broadcast station. Four songs plus bumps to the commercial breaks. I learned the tunes for the show, we rehearsed once, and the show went well. Felt like, "Wow, that was magic." I don't do this kind of performance routinely; it's something of a career highlight, actually.
The same evening there was a bar gig. And I sucked, or at least it felt like I did. I was really unhappy with my performance (too many clams and brain farts), and left there positive they were disappointed with me.
But it turns out that perception was greatly distorted. It was in my head, but not in reality. So I'm learning not to take that hyper-self-critical mindset to be accurate, when it sets in. And to try to avoid getting into that state in the first place.