Overreacting, panicking, screaming, yelling, or blaming someone else for what happened will become the true embarrassing moment. Whether someone spilled your secret or you accidentally walked into a wall right in front of your crush, keeping a level head will help you get out of the situation with as much grace and dignity as possible.  Taking a deep breath can go a long way in calming you down. Try to inhale for four seconds, then exhale for four seconds. As you are breathing, think about what you will say, instead of blurting out something defensive. So you just fell in front of the whole school at the pep rally. Get up, dust yourself off,and laugh. Say something like "Wow, that was embarrassing!" and keep going. If you're able to laugh at yourself, you'll take the tension out of the moment, and may even appear to be confident.   People are more likely to be forgiving of those who own up to their mistakes. If you acknowledge that you said or did something embarrassing, there might be a little teasing, but people will be more likely to let it go.  Even if you can't laugh about it in the moment, try making a joke out of it later. It will show you don't take yourself too seriously. You may be replaying an embarrassing moment over and over in your mind—the dumb joke you told in front of your crush that fell flat—but chances are you are the only one. People often aren't paying as close attention us as we may imagine and tend to judge others more on overall character than one embarrassing incident.  It's likely your crush didn't even notice the thing you're agonizing over. Or, if they did, it probably wasn't as bad as you think. Obsessing over a moment in the past can be destructive and does little other than make you feel sad and angry. If there's something to learn from the incident (like to pause and think before you speak), then take that lesson, and let the rest go. Remember that everyone gets embarrassed. Each and every person, from the president to your crush, has been embarrassed.

Summary:
Keep your cool. Own it and laugh it off. Don't dwell.