It's called the Batman Effect—distancing yourself from yourself to prevail at challenges such as speaking, singing, performing, beating up muggers, etc. It's both obvious given wisdom—who hasn't noticed that rock stars adopt alter egos?—and an emerging body of academic work. David Robson for the BBC:
In one study, participants were asked to think about a challenging event in the future, such as an important exam, in one of two different ways. The group in the "immersed" condition were told to picture it from the inside, as if they were in the middle of the situation, whereas those in the "distanced" condition were asked to picture it from afar – as if they were a fly on the wall. The differences were striking, with those taking the distanced viewpoint feeling much less anxious about the event, compared to the immersed group. The self-distancing also encouraged greater feelings of self-efficacy – the sense that they could pro-actively cope with the situation and achieve their goal.