A lender can only file judgment for a deficiency balance if the state law allows it. Most of the time the lender will opt to write-off the loan and thus 1099 the homeowner(s) for the difference. A good CPA will help you with a IRS form 932 which can identify how insolvent you were at the time of the foreclosure.
Government backed loans for both VA and FHA borrowers, the government is usually willing to work with you BEFORE foreclosure proceedings begin. Contact them at the first sign you are running in some trouble. Once again, the VA is willing to work with you if your foreclosure was the result of extenuating circumstances. You should have a contact number for VA or FHA on your loan coupon. Also they will both have some options based on their qualifications to work out some type of payment plan for you should they opt to collect on the deficiency.
A lender cannot file a deficiency judgement for any funds that they were, in fact, reimbursed by the mortgage insurance carrier. The key is this, if only 20% of your loan was insured; and the loss was 30%; they could file a deficiency judgement for the portion NOT reimbursed by the insurance carrier. You have a legal right to that information/disclosure under RESPA. But, you should ask for that information in writing, and send it certified mail/return receipt. If the lender does not respond to your request, it is a RESPA and HUD violation. Should they ever try to file a deficiency judgement, you could sue; just as a seller who had an FHA loan who can prove that they asked for a payoff statement that was never provided to them. The consequences of their not supplying you with a response, and indeed an accurate response, would be greater than the consequences of dismissing their claim against you later.