In the heat of a messy divorce, parents often forget to think about the best interest of the children. They do this by focusing on hurting the other parent, failing to realize the impact of fighting in front of the children, or by making negative comments about the other parent within ear shot of the children. All of these things put the children in the middle and often results in emotional harm.
There are often organizations that provide sliding scale services to parents and children in an effort to counter act the impact of divorce of the family unit. In the Bay Area, programs like Kid's Turn (kidsturn.org) provide families with workshops to foster communication, explain divorce to the children, and more. In areas where similar programs may not exist, courts often recommend co-parenting sessions with a marriage and family therapist. They do not focus on your relationship, but do focus on being able to put issues aside long enough to have open dialogue about the needs of the children so that parents can share joint legal custody effectively, and to be around each other at important events in the children's lives.
Like it or not, you will likely have to be involved with each other in some way for the rest of your lives - birthdays, holidays, funerals, weddings, graduations, grandkids, etc. Trying to find a method where you can communicate effectively, or at least be in the same room even if not talking at all, is important to do early on so that the children are not put in a position of choosing between their parents.