Tim Conway, What's So Funny?
W.C. Fields is famous for his oath "Godfrey Daniel!" in one of his movies. Here are a few other creative euphemisms: gollydingwhiz, gosh-all-hemlock, by-guess-and-by-gosh, gadzooks, grabs, goshwalader, good gravy, good gracious to Betsy, jeezy peezy, for crying out loud and geewhillikins, among hundred of others.
When you bang your head, hit your finger with a hammer or drop a raw egg, you probably don't have time to think about what you are going to say. Usually you just say it and then, if necessary, apologize afterward. Mostly we just say whatever we are in the habit of saying in such circumstances. I have long tried to form the habit of emulating one of my fictional heroes, Winnie-the-Pooh, who says, "Oh, bother!" in times of stress. That seems so proper and so British and so Poo-like that just saying it makes me feel better. And I don't think even my former pastor would be offended.