Well this could go both ways, is your question in respects to confident in your trick or confident as a person, i.e anxiety, shakes, and such?
I'll just got ahead and get into my answer. Your body needs to feel confident. Right before walking up and meeting the people or entering on stage, hold your head up high, have good posture, and smile. Psychologically this will help build esteem and confidence, it's just science. If you have fear messing up a trick then you have not practiced that trick enough. It's okay to have the shakes, even I know that, but you should be performing to a paid audience unless you know the stuff like the back of your hand and can do the phases with your eyes closed. Otherwise your mind will be too bothered to focus on patter/presentation/character/being you, and you will be at risk for failure.
When you are anxious or scared, in that moment you need to dumb it down to exactly why you are panicked.
Fear of failure? Fear of being embarrassed? Cause if you simplify it you will find the key, the answer to your struggles.
Before my New Year's gig I was anxious, I had a lot of things going on, I was in stop and go traffic (which didn't help), I was sweating, and making sure my prop management was right. When I arrived at the gig I held my head up high, became my bigger self, and just told myself, "I'm gonna smash some brains, give them a good time, they don't know whats coming! I'm simply just showing them the trick and being the presenter". Nailed it, bada-bing-bada-boom.
Find the source of your panic otherwise it will lead to frustration.