C.M.
I have trouble with my 9-year old on this and what has helped some is to give her a goal she can achieve before she competes. She does gymnastics and cheerleading so I'll tell her that her goal is to beat her last score (not anyone else's). Then she's only competing against herself. In cheerleading I'll tel her her goal is to hit her stunt and not fall down.
This doesn't always work, but I find she's not giving up as easily. Once in a while I do have to look her in the face and say sternly (but with love) "You get back OUT THERE and DO IT because I KNOW YOU CAN! We are the "C." Family and WE DON'T GIVE UP!!!"
Sometimes that works too :)