How does Groupon recover from this mess?
First, pull all the ads.
Second, don't explain. Apologize.
Third, take the $10 million or so you spent on production and media and commit it to doing good works. Not a big grand gesture like a multi-million dollar donation to each of the causes you insulted, but a community-based, grass-roots effort that will rebuild your trust with the people who matter most, your customers.
Every Friday, would be "Groupon Gives" day, and feature a local non-profit in every area that Groupon does business. People can donate to the non-profit and Groupon matches the donation. Also create a mechanism for people to connect and volunteer with the non-profits if they so choose.
Groupon tried and failed to tell people how committed they are to serving the greater good. They need to do something that demonstrates it.