Go to the http://www.cdpe.com web site. These agents are especially trained in distressed properties. There are many options available to you depending on how far you are in the process. You can locate a CDPE agent in your area by entering your address or zip code or town. They will be happy to talk with you about your issues and help you through the process.
Hope this helps.
What you're asking about is a deed in lieu of foreclosure. But you have other options, too: A short sale, a loan modification, and more. Contact a good Realtor in your area and ask about the options you have.