How to coparent when you’rewhen you’re still in love

I’m so heartbroken to make a long story short my kids father and I broke up .. wasn’t my choice smh but he has a new girlfriend now. We’ve been together for 6years not that that matters but I’m still in love with him , I still want to be with him and try to make us work. Not jus bc the kids but because I feel like we can fix anything that’s in the way. Well looks like I’m the only thing in the way bc I’m the only person that feels like that when he get my kids every weekend it hurts to see him (also them together) I know ultimately I can jus be an adult and suck it up and deal with it but it’s literally sending me into a deeper depression.. how to do parent when you’re still in love ?