Not long ago, there was a dust-up when Democratic strategist Hilary Rosen accused Mitt Romney’s wife, Ann, of not fully comprehending this country’s economic issues because she had “never worked a day in her life.”

Ann Romney responded, on Twitter: “I made a choice to stay home and raise five boys,” she wrote. “Believe me, it was hard work.”

The controversy swirled for days: stay-at-home mothers — SAHMs — had been dissed, and they weren’t happy about it. Amid the political and cultural fall-out, Elizabeth Mendes, deputy managing editor of Gallup.com, was paying attention. Gallup.com surveys 1,000 Americans each day about topics that percolate to the top of the news cycle. The editorial team noticed that news about moms — the stay-at-home sort and the working variety — was hot. So they decided to train their sights on the maternal demographic.

“The discussion around Ann Romney and Hilary Rosen started a lot of conversations about the different types of groups of moms,” says Mendes. “We thought, What can we look at to see what’s going on with this population?”

What they found doesn’t bode well for the morale of the SAHM contingent, according to results released in May that hint at the possibility that women’s happiness just might depend on their employment status.

Gallup zeroed in on all kinds of metrics for health and well-being, comparing happiness, anger and sadness, among other feelings, in working moms and those who stayed at home, as well as in women who weren’t mothers.

Gallup looked first at categories including anger, worry, stress, depression, smiling and laughter. It found that non-working women with a child under 18 at home experienced more worry, sadness, stress and anger than moms who are employed full-time or part-time.

One of the most noticeable differences revolved around questions about depression. Gallup asked the women polled if they’d ever been diagnosed with depression and found that SAHMs were more likely to say yes than working moms. Of SAHMs, 28% reported receiving a diagnosis of depression at some point compared with 17% each for employed moms and employed childless women. “Moms who are employed, full-time or part-time, look more like the employed women group than SAHMs,” says Mendes.

So does the data suggest that employment is the key to happiness? Well, it’s true that employed moms experience fewer negative emotions than SAHMs, according to Gallup’s survey. “It’s certainly possible that it’s because they are working,” says Mendes.

Gallup also compared different income groups, splitting women into high-income, middle-income and low-income categories to explore whether finances played a role in mothers’ reported well-being. Across all three income groups, SAHMs did worse on measures of sadness, anger and depression than employed moms.

When Gallup looked at other measures of well-being — such as happiness, enjoyment, learning something interesting and stress — there were no significant differences between working moms and SAHMs in the middle- and high-income groups. But differences remained in the lower income groups. “In general, we know that a very high percentage of Americans report happiness,” says Mendes. “So it might be endemic.”

Says Mendes: “This suggests there might be something about working that is creating more positive emotions for employed moms, or there might be something about staying at home that’s creating more negative emotions,” says Mendes.

This is not the first survey to conclude that working serves moms best. In December, a study in the Journal of Family Psychology found that working moms are healthier and happier than mothers who stay at home when their children are babies and preschoolers. On the other hand, 2009 figures from the Pew Research Institute reflect a different reality. An equal number of SAHMs and working moms — 36% — reported feeling “very happy.”

So much for the mommy wars. At least as far as U.S. kids are concerned, the finding that moms who work for pay and those who don’t are equally content is a really good thing.