Aside from the meds (discussed earlier in the thread), we have taken several approaches to anxiety management. This is a work in progress for us.
Part of the problem is that gifted kids are so unused to making mistakes in school that they don't really understand that everyone does all the time, that it's totally OK. It is important in school to be working right at the child's point of difficulty-- where the work is possible for them, not too hard, but hard enough that mistakes will happen-- so that they can have this experience. Our teachers are working on giving DS supportive feedback about mistakes that emphasizes that this is normal learning.
Some of what we do at home is problem-solving training in general: "OK, it's not right, how can you fix it to make it right?" Not only for academic work, but for any situation-- a dead battery in a toy, a ripped piece of paper, anything. Feeling like you can have another go at something, or repair the mess you made, is useful.
Part of it is just having more experience in accepting undesirable outcomes graciously. We praise DS when he makes a mistake and deals with it, or copes with adversity, and we explain why this is important. We play games where everyone loses sometimes (games of chance, and games of skill, both, and we talk about the difference)-- and we practice losing graciously at both kinds.
We parents also routinely point out when we make mistakes. Sometimes I make a wrong turn on purpose in the car, just so I can model that it's no big deal, I'll just go back the other way and the mistake will be fixed.
And we often emphasize process over product--"You did that really well, you must have practiced"-- if we know he did practice. If someone's better than he is at something, we suggest they might have practiced a lot, or have a talent for it, or both. He gets praise from us if he notices and compliments what others do well.
All of this is having some effect, though it is going to take a long while to make it part of his operating system.
DeeDee