I always approach things with the mindset of "if I can impress one person, I've done my job." This makes it so that when I do play shows to three people (which happens a lot), chances are much higher that I'll come away feeling good about the show.
There's something to be said for ant1's approach though. I'm not saying that people should abandon playing shows completely, but maybe be a little bit more selective when it comes to playing. If the lineup/venue isn't looking great, maybe just don't play the show? It kind of sucks that that has to happen, but sometimes it's the best way to avoid coming out of it feeling like shit.
Along those lines -- it's important to keep yourself feeling good about playing shows too. It might take the form of playing fewer shows so that you can avoid being "saturated" and stuff, or it could simply be bringing a bunch of friends to a house show and having a good time. It's honestly really dangerous to play a show without knowing the venue or bringing friends, just because there's the chance of feeling really bad about yourself after the show is over. I feel like that's something that's often ignored in discussion of live performance, simply because a lot of people have a mindset of "if you're performing live, you're voluntarily putting yourself out there for criticism."