In the minutes before any race, Olympic champion swimmer Michael Phelps would step on and then off his starting block repeatedly while listening to a specific playlist, usually with music from Eminem or Young Jeezy.
Before heading into an operation, neurosurgeon Mark McLaughlin sits by himself and listens to a Bach cantata, then walks swiftly into the operating room. Comedian Stephen Colbert chewed a specific type of Bic pen and lightly high-fived all of his crew members before filming episodes of "The Colbert Report."
Many would find those rituals superstitious or odd. But according to Daniel McGinn, senior editor of the Harvard Business Review, they work. Having a pre-performance routine, he writes in his recently published book, "Psyched Up," is key to reducing anxiety and building confidence.
"You can be a really good pianist. You could have practiced, done your 10,000 hours," McGinn tells CNBC. "But if in those few minutes before you go on that stage you're nervous...it will detract from your performance."
He suggests every person adopt their own pre-performance routine. As McGinn points out, a growing body of research indicates it will help you perform better in stressful situations, from job interviews to presentations.
A study by Harvard Business School researcher and assistant professor Alison Wood Brooks found that those who are able to see a nerve-racking situation as an opportunity and not a threat perform better.
Specifically, she says, those who "reappraise" or re-categorize their anxiety as excitement end up showing more enthusiasm and performing better in subsequent tasks. Telling yourself things such as "I am excited" or "Get excited" positively correlates with better results in a stressful situation.
In a separate study titled "Power gets the job," social psychologists found that job applicants who were primed to recall a time when they felt powerful before the interview were much more likely to get an offer than those who weren't. In other words, remembering a time you felt on top of the world helps you exude confidence and energy.
"As much as we would like to be able to control our stress, and manage it," McGinn says, "it's a biological function that's built right into us."
"A ritual is sort of an instruction manual for stressful situations," he adds.
Few situations can be more stressful than being in the operating room where a patient may be minutes away from death, but that's exactly where McLaughlin often finds himself. Before a procedure, he plays classical or country music, depending on the patient's condition, McGinn writes. Next to him, he keeps a tray of outdated tools that remind him of a particular teacher. It helps him focus, relax and stay motivated.
Not all pre-performance routines, however, have to be that elaborate.
"Having something is probably better than having nothing," McGinn says.
If you know you're going to have to do something nerve-racking, start thinking of a routine that would work for you. Listen to an inspiring song, have a phrase you repeat to yourself or develop a simple action you can do to channel the stress into excitement. After all — it works for the pros.
"You need to find ways, in those final few moments," McGinn says, "to turn your emotional dials in a way that puts yourself in the mindset to perform."
Like this story? Like CNBC Make It on Facebook.