How do people cope with this?
You just do.
You put one foot in front of the other and don't look too far into the future.
There's no point in worrying about the things you can't control (eg wider family relationships or what your next house might look like). The size of your house doesn't matter. It's the love, security and safety within its walls that counts.
When your daughter is with her dad, you build your own life - friends, hobbies, career, studying, whatever it is you want to do.
Other relationships can be maintained if everyone wants them to be.
But you don't need to have all of the answers right now. One step at a time.
Your life isn't ruined, the future is just going to look different to how you thought it would.
This is an exercise in resilience and independence. So find your own positives in it.
From experience, if you spend the next few months looking backwards and worrying about what you've lost, you won't see the joy ahead. If you face it head on, you'll only see the opportunities.