What is the evolutionary advantage of being embarrassed? What I am trying to understand is why do I feel embarrassed in certain situation. 

E.g. when I'm talking to people, why do I think about being judged or sounding stupid that would result me in embarrassment. I have been considered as "intelligent" since I was a kid and may be making or looking stupid goes against my own belief of me being 'intelligent'?

Also, when I'm playing a game or playing music, I think about embarrassing myself, making mistakes and think what may the audience/team mates thinking about me? So I avoid it and when I actually get a chance of play, I make mistake and regret/punish myself mentally for making a mistake or regret quite a bit. So, basically, this results me in being low confident. 

I'm thinking about "impressing people" and me resulting in an embarrassing situation, acting stupid, sounding stupid would spoil my "impression". 
However, I want to act stupid or sound stupid sometime and be ok with it. 
Somehow my biology/mind prevents me every time and I feel the resistance. 

So, in search of understanding the reason, I wanted to ask if this has any evolutionary benefit or is it part of natural selection? E.g. having a better chances of survival, when you express less/ be quiet or shy, so that others are not threatened by you? 

Can anybody with more knowledge shed some light or possibly guide me to help my situation?

Thanks for reading a long post!
Marks and Nesse investigated evolutionary causes of anxiety disorders and reported about embarrassment in particular:  


  Social threats evoke responses that promote group acceptance, for
  example, submission to dominants and to norms of dress, mien, odor,
  speech, customs, beliefs. This prevents dangerous extrusion from the
  group. Mild shyness and embarrassment can promote acceptance. If
  shyness and embarrassment are excessive, however, then fitness
  suffers, as in several anxiety disorders: pervasive shyness in
  avoidant personality disorder; gaze aversion and fear of scrutiny, of
  shaking, and of blushing in social  252 I. M. Marks and R. M. Nesse
  phobia; fear of excreting near others in sphincteric phobias (Marks
  1987, pp. 362-371); terror of looking or smelling abnormal in
  dysmorphopho- bia; fear of behaving antisocially in
  obsessive-compulsive disorder. Impulses to behave in ways that would
  cause social rejection may arouse general anxiety without the subject
  being aware of those punishable impulses, thus helping to conceal them
  from others (Nesse 1990). We do not emphasize a distinction between
  fear of specific dangers and anxiety aroused by nonspecific dangers or
  unconscious impulses, because in all cases the state, whether anxiety
  or fear, is aroused by a cue that indicates a threat to reproductive
  resources.


Nesse, Randolph M. "Fear and fitness: An evolutionary analysis of anxiety disorders." Ethology and sociobiology 15.5-6 (1994): 247-261. https://doi.org/10.1016/0162-3095(94)90002-7