When it comes to what's best for the children, I think it's important to realise that quality of parenting is what counts, not number of, gender of, or relationship status of. A good single parent can create a more nurturing, stable and loving family environment than two warring parents. Good families can come in all shapes and sizes - traditional nuclear, two same-sex parents, a single parent, separated but amicably co-parenting... Quality of parenting is what counts.
The reason the trite old comment of 'Happy mum = happy child' came about is because there's a lot of truth in it - a desperately unhappy parent or a dysfunctional family dynamic can cause a lot of difficulty for a child. Some selfish people may interpret that to mean they can do whatever they want without a thought for their children, because as long as they're happy the children will be too, but I think they're a minority.
I believe strongly that staying in a relationship that is unhealthy or desperately unhappy is bad for children. Far better to separate IMO. However, at the same time, it's important to recognise that this usually comes with significant change for the child and this must be acknowledged and worked with, not glossed over. A child must be allowed to express his/her doubts, fears and grief without fear of guilt or being met with falsely cheery platitudes. A significant drop in the standard of living is also difficult for a child to live with and for a child who doesn't consciously understand how toxic his parents relationship may have been, it can be difficult to feel that a new way of living is 'better'. All this needs to be confronted.
What determines how well a child recovers from separation of the parents is the quality of the relationship with the primary caregiver first and foremost, and the relationship with both parents overall. Children can and do recover and often will be better off long term because the parents separated.
It is easier to separate these days and more people are doing it. We see this as failure and there is lots of talk about making divorce harder. I wonder whether the rising divorce rate actually reflects a decreasing tolerance for bad behaviour in relationships. In the past people put up with abuse, infidelity, or simply being treated like a glorified domestic appliance/cash supply. It was kept hidden behind closed doors. Now they don't and it's in the public arena. I don't see that as a bad thing personally. That the children of parents who separate tend to have less good outcomes than those who stay together is IMO a reflection of the bad behaviour expressed by those parents, not the fact that they separated. In fact, separation may be the first step towards fixing things; it's just in many cases the damage has already been done. I think if the parents stayed together, the only difference between the outcomes of those children would be the fact that the parents were still together - you'd still have the same poorer outcomes. Maybe, as more and more parents refuse to tolerate this behaviour, we will eventually reach a point where people improve their behaviour in their interpersonal relationships or they will face being perpetually alone. Maybe this period in history is part of the transition.
FWIW, there is also a lot of separated parents who buck the trend, enough certainly to suggest that it isn't separation itself that;s causing the problem, merely the factors that come with it. Poverty is the biggest one and when income and the mother's educational attainment is factored into these studies, it is interesting to find that there is no difference between the outcomes of children from single parent families and two-parent families.