First, let's back up a minute. You bought your home under the first-time buyer provision of the Housing and Economic Recovery Act of 2008, which was essentially an interest-free loan program. Had you made the purchase under the revised 2009 program, you probably wouldn't have had to even worry about paying back the first-timer money. That's because it became a "credit" and was upped to $8,000 in 2009, assuming you didn't sell before a three-year period expired. It's called patchwork legislation.
Here's how those 2008 deals were structured. If your house stopped being your main home at any point during the 15-year period in which you were to repay the loan, you were obliged to repay the balance of the credit on your next tax return, a phenomenon the Internal Revenue Service calls "acceleration of recapture."
But -- and this is a very big "but" -- the law imposes a cap, in some cases, on how much you must repay. You don't have to repay more than the gain you make on the home's sale, under most scenarios. This is important when the property is taken back in foreclosure, because only a minuscule number of foreclosure sales result in profits.
If the foreclosure sale somehow did result in a gain, you would compare your original purchase price to the price that the foreclosure sale netted. If that foreclosure sale somehow brought in more dough than your purchase price, you'd have to pay back the difference or $7,500, whichever number was smaller. For a nonrecourse loan (your old lender can tell you if your loan was nonrecourse), the calculations would change somewhat.
Again, this is moot because nearly no homeowners turn profits on foreclosure sales these days, with the exception of a few in very popular land-constrained urban areas such as New York or Southern California. Hence, you likely have no tax consequences due to your foreclosure. However, your individual financial circumstances (and ideally, a tax professional) will ultimately determine that.
I'm sorry to hear of your job and home loss. In case you're curious, you needn't count out homeownership ever again. Fannie Mae, Freddie Mac and the Federal Housing Administration say there's typically only about a three-year wait before you can successfully apply for a mortgage loan again after a foreclosure that was caused by extenuating circumstances, assuming you land gainful employment again.
Good luck getting back on your feet.
Ask the adviserTo ask a question of the Real Estate Adviser, go to the "Ask the Experts" page and select "Buying, selling a home" as the topic. Read more Real Estate Adviser columns and more stories about mortgages.