That is a very important and big question.
I have been caring for my wife, who has early-onset dementia, for several years now. My limited perspective would be that the answer to your question depends greatly on what stage of dementia the spouse is in.
The issues we have faced and worked through were very different in the first couple of years than they are now. So how I have coped has changed over time, too.
As far as how I have coped? At times, not well. At other times, ok. It has been and continues to be really difficult. We have two young kids, so my focus on them has helped me. Working has helped, as well, so I have something I'm doing other than caregiving (even though I work from home). Of course, with working comes needing a caregiver during working hours, which is expensive and adds another layer of complexity to coordinate. I only have caregiving help during my work hours, so that is one thing I am not doing well - I have essentially zero time when I'm not either working a demanding job or being a caregiver. Exercise has helped me - stabilizes my mood and hard things are easier when my body feels good and I have energy. Decent sleep is in this category too - everything is harder when I'm tired. (There have been streetches when my wife would not sleep, would be up wandering, which were hard weeks where quality of sleep was not in my control. But I try harder now to get good sleep when I can.) I know lots of people get support and help from friends and family. That hasn't been a good option for me given we moved to be near my wife's family where I don't know anyone, but I know others have reported this as important. I will note that I decided sometime back to be fairly transparent with neighbors, family and friends - making that change from at first keeping things 'private' helped. Neighbors have been helpful on many occasions and it has just felt better to me to be open about it. For me the situation is incredibly isolating, so anything that reduces that feeling of isolation is valuable. I hope this helps a little, it is a hard road. Last thing I'll say is to focus on things one day at a time. It is a cliche, but for me dwelling on the unknown future was stressful and not productive so I try to just make each day good. When I go to bed at night, I ask myself three questions: 1) What's one good thing that happend today?; 2) What am I grateful for?; 3) What's one thing I am looking forward to? Oftentimes I have no answer to number 3, which feels bad, so I try to find or create something to look forward to.
I hope this helps a little.
Best of luck to you, I wish you well.