I had been getting frustrated recently. I would practice to where I'd thought I had mastered a piece, but would be disappointed in the way I'd perform it in concert. I couldn't figure out the solution, but then it dawned on me. I need to have skill to spare.
I used to practice every piece so that I could play it at 100% of the original's speed. That's not a bad idea, but the problem is that when I add the excitement of performing, start without much warmup, and play on a strange piano, I'm no longer capable of comfortably performing at 100% speed with ease.
So I made my practice harder. Now I'm making myself master pieces at 112.5% of original speed (for example, if a tune's performance speed is 240 beats per minute, I practice it at 270). The strategy worked beautifully, as I performed one of my most challenging tunes with as much ease (and fun) as I ever have.
Practice so you have skill to spare. Develop mastery even while giving yourself less time, adding distractions, or doing anything that might make success for difficult. That extra preparation will almost guarantee a performance you're happy with.