A deed in lieu is a process in which you voluntarily give the title to the house to the lender, the lender accepts the title and agrees not to initiate a foreclosure or sue you for a deficiency. Keep in mind, this is a negotiation, and nobody is obligated to agree to this. In my experience, due to the risk involved, lenders don’t do this very often. It is more likely that the lender would be willing to accept a consent foreclosure after the suit is initiated, which would mean you give your title away and the lender can not ask for a deficiency judgment, but even that is optional. Good Luck.
If you are interested in applying for a deed in lieu ask for an application from your servicer. To qualify for a deed in lieu, generally, you must have had the house on the market for 90+ days without a sale. Sounds like you have that part covered. Also, you can't really have a second mortgage on the home. If a deed in lieu fails, you may try a consent foreclosure. A consent foreclosure does not really become an option until after the bank files foreclosure.
The information in this answer is not intended as legal advice nor do I intend to create an attorney-client relationship with any reader simply by answering this question or contributing as a member of AVVO.
I agree with both of the other attorneys, but just want to make clear that (a) the lender is NOT required to accept title and you can not simply give them a deed and (b) one of the fundamental goals of these kinds of negotiations is to avoid a deficiency (spread between what you owe and the lesser value of the home).