In my past life, I worked for a mortgage bank. I worked in the loss mitigation department, which is a fancy way of saying that our department was in charge of making sure that we lost as little money as possible. Mortgage banks typically lose money on every foreclosure, short-sale, or deed-in-lieu of foreclosure, so a large part of loss mitigation is trying to help families stay in their houses.
Sometimes, however, the goal of trying to keep families in their homes was actually counter-productive to the family's long-term financial well-being. They would continue to scrape together payments, raiding retirement accounts and borrowing from family, on houses that they were going to eventually lose anyway. In the end, they were homeless AND had no retirement AND owed friends and family. That's no way to be, and those families would have been better off by ending their homeownership much earlier in the process.
Now that I'm a financial counselor, I see a similar trend among military families. It's pretty common for homeowning military families to receive PCS orders away from that house. Sometimes, the house sells quickly, or the family finds a tenant that covers their costs. Other times, however, the house won't sell, or market rents don't cover the costs of ownership. In these cases, the family needs to make some hard decisions about how to proceed.
I don't suggest that anyone proceed with a foreclosure, a deed-in-lieu of foreclosure, or a short sale unless they really have no other options. But what if you're in that middle ground between completely good and completely bad? What if you could sell, but you'd have to bring $10,000 to the closing table because home values have declined and you didn't have a large down payment? What if you can rent, but you have to contribute $300 a month towards the mortgage?
The right answer is often unclear, and sometimes there isn't a right answer. In my experience, people tend to err on the side of trying to hold on to a house that they can't afford long-term. It is often better to sell at house at a loss than to take a loss every month, but that is hard to see when you're looking at a five-figure cost just to NOT own a house anymore. But bringing $10,000 to closing to pay a loan in full is much better than six months of an empty house, and then years of not-enough rent.
In an extreme example, I once had a client who was seeking an Early Return of Dependents (ERD) for financial hardship. They had a house in the US that wasn't selling or renting, but they had passed up a full-price offer because it "hadn't been on the market long enough." I think that this client somehow thought that they should have gotten more if they got an offer so quickly, but the long-term situation didn't work out that way. They were destroying their financial future because of some misguided sense of what the present was supposed to look like.
Homeownership is always risky while you are still on active duty. If you choose to take that risk, and find yourself in a bad situation, please take the steps necessary to migitate your losses before they swallow you up. Don't use your retirement savings to pay your mortgage, unless there is clear evidence that it is a short-term situation. Ditto for borrowing from family and friends. It can be hard to move past a financial hardship, but it is a lot harder if you've created a pile of financial problems instead of just dealing directly with the single, original problem.