After a deed-in-lieu offoreclosure, preforeclosure sale, or short sale, there is a mandatory waiting period of two years for a loan with an 80% maximum LTV (loan-to-value ratio), or four years for a loan with a 90% LTV.
That would include mortgage debt which is forgiven as a result offoreclosure, as well as debt restructuring, short sale or deed in lieuofforeclosure, so long as the debt is associated with the purchase, building or improvement of your main home and even if that debt is considered recourse debt.