Sure you've done it, we all have. Maybe you're not drunk, but you're overtired and cranky and had a burning desire to state your feelings in an email? Once you click that send button, you know (accompanied by a sinking feeling) that you've made a terrible mistake.
Google has to our rescue. They've come up with a cool new tool for Gmail that may prevent us from emailing while drunk, Mail Goggles. Once you hit the send button on that email you composed in the dark of night, Mail Goggles will present you with five math problems that must be solved in a limited amount of time. Only if you complete the computations in the given time will your message be sent. I've always felt that doing math (even simple math) is a sobering experience.
Mail Goggles, by default, is only active on weekends and nights, but of course you can adjust that to be more in balance with your personal 'happy hour.'