Unfortunately, a great way of dealing with Catch-22 situations is to avoid them completely. It's a matter of clearly communicating what you need in your negotiations. Here are some ideas to help prevent this situation or help bail water if you're in it already.
If you need to sell your existing house to buy a new one, you can take your chances that both deals will close as planned. By doing this, you present sort of an illusion, making a strong offer on the new house and aggressively trying to sell the old one. But you run the risk of being drawn-and-quartered (or halved) if the deal to buy your new house completes and the deal to sell your old one falls through, or is a non-starter.
A less risky approach is to build in contingency clauses.
On the buy side, you might agree to only purchase the new home if the old one sells. While this makes your offer less attractive because it increases the risk to the seller, you can compensate for that with cash (i.e. you'll pay them x if you back out, x minus y if you back out after the loan closes, etc.)
On the sell side, if getting your new house depends on this sale, you can communicate that to the buyer --- not verbally, but in writing with another contingency clause. This tells your buyer that if they back out, they've damaged you and should compensate you for it. (You may have to back out of the other deal and trigger the penalty on that contingency above, right?) The caveat is that your potential buyer now has some additional leverage so you'd need to decide what you're willing to trade to minimize your risk.
The financial incentives in those contingency clauses need to escalate or decrement depending on which side you're looking at it from and how far along the deal is. Sadly, this is a realistic scenario and people feel for the poor folks who are in this situation, but your agent needs to be there for you to prevent this from happening.
If you're already in this scenario, you need to assess your cash flow and risk tolerance.
If you can effectively market your property and/or are willing to sacrifice 8% of your collected rent for a property management company, leasing your house will buy you some time. You may still be underwater per month, but it will be less than if you carry both properties. The joke is that you can get "any" price you want for your house as long as you're willing to wait long enough. Just remember that no buyer sees buying a house that's been rented before as a plus and inflation is a...
Otherwise, it may only cost you a small amount (compared to a potential back-breaker of two mortgages) to back out of your new home purchase. Investors do this already but home buyers should also take heed: becoming emotionally attached to a property before the deal closes is a sure fire way to hurt yourself financially. Moving into your dream house mentally before the furniture gets there will lead you to do things like overpay or over-extend yourself. Being excited about a new house is a good thing, and if you actively decide to overpay, that's fine, but you need to make conscious, proactive decisions when dealing with this amount of money.