We talk to a lot of people who are struggling with underwater mortgages. Not only is the mortgage less than the value of home, but the mortgage payments often make it difficult for them to pay their other bills, especially if they’ve had a financial hit like a divorce or a job loss in the family. For some of them, it may make sense to just walk away from their mortgage obligations.

No, I don’t mean to literally just stop paying and move out of the home, although that’s not unheard of. I’m referring to one of a variety of ways in which your mortgage company agrees to forgive the remainder of your mortgage and avoid foreclosure. One of the most common is a short sale, in which the mortgage lender lets the homeowner sell the property for less than the remainder of the mortgage balance. Another is a deed-in-lieu of foreclosure, in which the homeowner may simply give the deed to the mortgage company in exchange for cancellation of the mortgage balance.

So why would the mortgage company do this? It’s certainly not out of the goodness of their heart. The truth is that mortgage lenders dislike foreclosures almost as much as we do. After all, it’s a huge hassle for them to deal with maintaining and selling properties since that’s not exactly the core of their business.

While these options still hurt their credit, the benefits to the homeowner are more clear. Not only can they get out of their mortgage, they may also be able to buy a new home much sooner than if they had gone to foreclosure. Fannie Mae guidelines allow you to purchase another home in 2-4 years or if you don’t have any late payments over 60 days on your credit report, you may even be eligible to purchase a new home immediately. But after a foreclosure, Fannie Mae guidelines generally require you to wait 7 years before you can buy a new home.

Some people feel morally obligated to make their mortgage payments but personally, I wouldn’t. After all, do you really doubt that the mortgage lenders would feel morally obligated to you if the tables were turned? Besides, the lenders are agreeing to these transactions and they make loans fully understanding the risks involved. It’s a business decision for them and I think it should be the same for you too.

There is one hitch to all this though. Normally, cancellation of debt is subject to income taxation. (Talk about adding insult to injury.) On a large mortgage forgiveness, that can really add up to a hefty tax bill. However, Congress passed a law called the Mortgage Debt Relief Act of 2007 that exempted most of these mortgage cancellations from taxes and has continued to extend the law each year. The problem is that the law currently expires at the end of this year and there’s no telling whether Congress will renew it again, especially with everything else on their plate right now.

So what does this mean for you? If you’re having trouble making payments on an underwater mortgage, have exhausted your options for loan modification like the Home Affordable Refinance Program (HARP),  and are considering a short sale or deed-in-lieu of foreclosure, now is the time to make a decision and take action. These transactions can take a while so you’ll want to pull the trigger now for any chance of completing it before the end of the year. Otherwise, you may have one more financial headache to deal with next year.