It's times like this, on issues like this, that I'm most saddened by the restriction of access to academic literature. Being privileged with access to such material, I'll provide at least some citations and quotes from this restricted pool of research.
I will draw liberally from an excellent review that was accepted for publication in 1998, The Adjustment of Children with Divorced Parents: A Risk and
Resiliency Perspective.
The linked article specifically addresses the question at hand: is it better to stay together or get a divorce?
Here I shall quote directly (less than 1 page of 13 with snippits noted and emphasis added, though the entire article is so very applicable):
Should Parents Stay Together for the Sake of the Children?
One of the most frequently asked questions about divorce is whether it
is better for parents to remain in an unsatisfying, conflict-ridden
marriage for the sake of the children or to divorce. Research in two
areas has been used to address this question: the first involves
research on the adjustment of children whose parents will later
divorce; the second involves research on the impact of marital
conflict on the adjustment of children.
Children whose parents will later divorce are already showing problems
in adjustment many years before the divorce (Amato & Keith, 1991a;
Block et al., 1989; Cherlin et al., 1991; Hetherington, in press b).
This has been attributed to the deleterious effects of marital
dissatisfaction and conflict on children’s adjustment, to the fact
that a difficult, maladjusted child may erode marital happiness, and
to possible underlying genetic links between divorce proneness and
problem behavior in parents and children. Personality problems in a
parent, such as emotionality and lack of self-regulation that lead
both to divorce and inept parenting, may also be genetically linked to
behavior problems in children (Jocklin, McGue, & Lykken, 1996; McGue &
Lykken, 1992).
Children in families with high marital conflict exhibit many of the
same problems in adjustment as those in divorced families, with
externalizing disorders being most commonly reported. However, all
conflict is not the same in its consequences for child development.
Conflicts about the child and to which the child is directly exposed,
or conflicts that involves physical violence or in which the child
feels caught in the middle, are the most harmful (see Davies &
Cummings, 1994, for a review). [...]
Offspring from happily married harmonious parents show fewer problems
and greater well-being than those in divorced families or in families
with high marital discord or distress (Amato & Booth, 1991; Amato et
al., 1995; Hetherington, in press b; Simons & Associates, 1996).
Immediately after divorce, children in divorced families exhibit more
problems in adjustment than those in highconflict nondivorced families
(Hetherington, in press b). The stress and changes accompanying the
divorce transition take their toll. However, as children adapt to
their new situation in a single-parent household, the pattern of
differences changes. When divorce is associated with increased stress,
conflict, and adversity, children, adolescents, and young adult
offspring show more problems in divorced families than in
high-conflict nondivorced families (Amato et al., 1995; Hetherington,
in press b). When divorce is associated with a move to a more
harmonious, less stressful situation, children in divorced families
are similar in adjustment to those in intact families with
nondistressed marital relations and are higher in social
responsibility and cognitive agency and lower in externalizing and
internalizing than those in high-conflict distressed marriages (Amato
et al., 1995; Hetherington, in press b). High levels of conflict have
more adverse effects on the adjustment of children in divorced than in
nondivorced families, perhaps because a second residential parent is
not available to serve as a protective buffer and because of fewer
resources and higher rates of stressful life events in divorced
motherheaded families (Hetherington, in press b). In addition,
although by 2 years after divorce girls do equally well in
low-conflict divorced mother-headed families and in lowconflict
nondivorced families, there is some evidence that boys do less well in
the former (Hetherington, in press b), perhaps because of the lack of
a male role model or because of the coercive interactions in which
divorced mothers and sons frequently become involved and the lack of
effective control exhibited by many divorced mothers with their sons.
The evidence in response to the controversy about staying together for the sake of the children suggests that if conflict is going to
continue it is better for children to remain in an acrimonious
two-parent household than to suffer divorce. If there is a shift to a
more harmonious household a divorce is advantageous to both boys and
girls. However, even with low acrimony between the divorced parents,
boys in low-conflict divorced families are disadvantaged over those in
low-conflict nondivorced families.
In short, if I may crudely summarize dozens of studies: less fighting, more harmony, less conflict, less stress = better lives (for children and adults)
The problem, as it relates to divorce or staying together, is neither staying together nor divorcing brings any requirement for attaining any of the above beneficial outcomes. Some people get divorced and bitterly fight just as much (or even more) than when they were married, even though they were in terrible conflict during the marriage. In such a situation the children will be harmed regardless, and whatever reduces their exposure to violence, conflict, and stress is best - however that can be obtained.
If parents provide a stable, harmonious, low-stress environment for the children, the research seems to indicate getting a divorce is not necessarily helpful to the children and may be more harmful. This however assumes that the situation is actually all these positive things - fighting behind closed doors that the children still hear and experience, especially when the fighting is about the child themselves, is not such a positive environment at all. Strong self-regulation and absolute rule-following by both parents is required, and this sort of discipline and consciousness is not something all that commonly encountered - but it is absolutely possible. Some people claim great surprise as adults when their parents get a divorce and learn that their parents weren't really all that interested in being married for years - but I do not find research that addresses this in a satisfying way.
Furthermore, it is noted that the adjustment level of the children prior to divorce is greatly predictive of how well a child will adjust post-divorce. To quote again:
Stresses associated with their parents’ marital transitions tend to exacerbate problems in already troubled and poorly adjusted children
(Block et al., 1989; Elder, Caspi, & Nguyen, 1992; Hetherington, 1989,
1991). In contrast, children who are intelligent, competent, and who
have an easy temperament, high self-esteem, an internal locus of
control, and a good sense of humor are more likely to evoke positive
responses and support from others and to be able to adapt to new
challenges and stressful life experiences (Hetherington, 1989, 1991).
In fact, children with these characteristics may be enhanced in future
social problem solving and adaptability by having encountered and
coped with moderate levels of stress under supportive conditions
(Hetherington, 1989, 1991). The psychologically rich may get richer
and the poor get poorer in dealing with the challenges of divorce.
In summary, I leave it to the words of Hetherington and Stanley-Hagan:
Despite some inconsistent findings regarding divorce, answers to many
of the most frequently asked questions about divorce raised at the
beginning of this article have emerged in the past decade. Although
children in divorced families, in comparison to those in nondivorced
families, are at risk for developing more social, emotional,
behavioral, and academic problems, most eventually emerge as
reasonably competent, well-functioning individuals. The great
diversity in response to divorce is related to the interaction of risk
and protective factors associated with individual characteristics of
the child and the family and extrafamilial environment. Parents can do
a great deal to moderate the effects of stress on children by
maintaining authoritative parenting and minimizing conflict.
Interparental conflict undermines both the quality of parenting and
the adjustment of the child and leads to diminished contact and child
support by noncustodial fathers. Contact with authoritative
noncustodial fathers under conditions of low conflict can have
beneficial effects for children, especially for boys.
The family environment with the fewest risks for unsuccessful child
socialization is a happy, intact, twoparent family. Children are at
risk for developing problems in adjustment when they grow up in either
a conflicted two-parent home or in a single-parent home. However,
children adjust better in a harmonious singleparent household than in
an acrimonious two-parent household. There is little support for the
position that children benefit from remaining in a conflictual intact
household if divorce will diminish conflict and if authoritative
parenting can be maintained. In the absence of conflict and with a
custodial parent who is able to provide a positive parenting
environment despite the stresses inherent in single-parent roles,
children in divorced families are likely to be competent and well
adjusted.
These conditions may be difficult to attain. The stresses encountered
during and following divorce should not be minimized and for some
parents and children they are pervasive and persistent. Moreover, the
few systematic studies of interventions for divorced parents and their
children suggest that when adverse outcomes occur they may be
difficult to modify through educational or short-term therapeutic
interventions.
There is much more to know and to research, but we appear to have some answers from the combined research. As we might have suspected, divorce is a difficult decision with a great deal of certain costs and uncertain potential benefits. It can be beneficial to children and adults in some situations, but it cannot be hoped to be a panacea or that absolves anyone of responsibility to provide a positive, stable, low-stress, low-conflict environment for their children.