As you may assume from what you've seen in the past, when you and your partner can get along, even during a divorce, your children are going to fare better. Children are struggling with many things when going through a divorce including changes to their routines, coping with the loss of the structured family unit and more. If fighting is added on top of this, children are going to have a difficult time adjusting.
As parents, the best thing you can do for your children is focus on being kind to one another. Yes, you are divorcing because your marriage didn't work out. However, your child or children are a result of happier times in your marriage. It should be your joint goal to make them as comfortable as possible during your divorce, even if it causes you some discomfort to do so.
How can you make a divorce easier on your children?
The first thing to do is to make sure you're both willing to work together. You should sit down and go through mediation or counseling if you need it. You don't have to have the goal of keeping your marriage together to go through counseling. Counseling and mediation can also help you learn to work together as separated parents, to improve communication and to understand what you need to do to help your children.
Another thing you should consider is hiring a third-party therapist for your children. While it's important for you to speak with them regularly about what they're going through, their questions and the divorce in general, a therapist may have tips and techniques that can help your child cope more effectively.
A third thing to try is to work out a parenting plan that you both agree on. If you can agree on how to raise your children, even if you agree on nothing else, then that will help you ease the tension that your children would otherwise sense between you.
You and your to-be ex-spouse need to work on communication and effective parenting skills, even if you don't want to be in a relationship. Although it may be uncomfortable for you at first, being kind to one another (or at the very least, respectful), is going to go the furthest toward helping your children feel comfortable with you and with the changes that have come with the divorce.