Do you co parent with someone you hate?

Did the father/mother of your child hurt you really badly and now your scared parent with them when baby is born because they only emotionally hurt you but really really badly and they will still probably get rights to the child..how do I deal with this?dude broke my fucking heart im trying so hard to be okay but it’s just not getting better terrified about parenting when baby gets here because I know he will probably atleast get weekends or visitation..