Am I wrong?

Ok so here it goes I’m 28 years old and currently pregnant with my 3rd baby. Me and my husband split and I had a drunken night with my ex 🤦🏼‍♀️ yes I know wrong thing to do. But I really thought I wasn’t going to be able to fix anything with my husband. Anyway I moved 3.5 hours away by my ex and my grandma ended up falling and breaking her hip(this lady raised me) my husband has my 5 year old and I have my 11yr old. My youngest daughter is confused and feels like I left her. Me and my husband have been working through our issues and I do still love him 12 years together is a lot to throw down the drain. Anyway the baby’s father and I have been friends for 16 years. Anyway I told him I wanted to go back and be with my daughter and grandma. He basically told me that if I leave he will resent me and I’m taking his first baby away from him. But my daughter needs me and so does my grandma! What would you do?

Update** I went back home and I made the right choice me and hubby are working things out. I’m back with my daughter and couldn’t be happier 💖