Going through a divorce pits you against your ex, which can lead to more negative feelings than what were present when the process started. It can be difficult to overcome these, but this doesn't mean that it is impossible. If you and your ex will remain friends after the divorce, which might be necessary if you share children, both adults will have to put forth an effort.
One of the top priorities that you have to think about is setting clear boundaries for the new relationship. This has to be based on what you are able to handle after the marriage is over. At a minimum, you should set a clear standard for mutual respect. You might also need to make clear plans for how new significant others will be introduced to the children and what role they will have in the children's life.
Another thing to remember is that you shouldn't try to rush into becoming friends. There might be some emotional wounds that have to heal before you can take this step. Just take things one day at a time so that you aren't trying to force it.
It can be hard to fully move on when you still have regular contact with your ex because of the children. You might benefit from finding activities and interests that you can enjoy now. This gives you something to focus on that doesn't have to do with your ex. It can be a stress-relieving activity that can help you find purpose in this new life.
If you do plan to remain friends with your ex, make sure that you have everything for the divorce settlement and child custody matters clearly outlined in the paperwork. This can help reduce conflict, so you can settle into your new friendship.