Feeling ashamed...

So I had sex this morning with my ex. We broke up 3 weeks ago, and I've done my best to keep strong. And keep our relationship casual and civil for our daughters. But I just caved in way too easily at his disposal tbis morning and had sex with him. I'm ashamed of myself. He's not going to ever respect me now and I feel like hesthinking he can now just have his single life and have me when he wants. I can't let this happen again