As partners you can separate or divorce. As parents, you have a job for life. When you have kids together your relationship with each other never really ends, it changes.
You need to keep your parenting relationship alive and constructive, even when dealing with each other hurts. It might be a huge challenge. It's also one of the best gifts you can give your kids.