Don't worry too much about the mistakes you think you make.
Pick yourself up and start fresh tomorrow.
You've made it through the wedding. It was hard, but you did it.
You'll make it through other events one day at a time.
Some other ideas about diverting your mind -- work on a puzzle, talk to an "in real life" friend, go to a movie. My all time favorite is to go for a walk. What are your favorite hobbies?