Inside the mortgage business this is what is referred to as “ jingle mail” (keys in an envelope). Even if you are planning to exit your home without paying the mortgage, there are typically better ways to accomplish this than simply mailing the keys to your lender. In the case you described, vacating the property and mailing the keys to your lender, the loan must still go through the entire foreclosure process. This is a legal process where the lender must petition for foreclosure due to a violation of the terms of your loan (not making the payment). The petition must go to court and the foreclosure must be approved before the bank can legally take possession of the home. The entire time this happens the mortgage loan will be reporting in increasing delinquency to your credit report. This is because, despite ‘mailing the keys back’ you are still the owner of the home as it would not have transferred until foreclosure was complete.
There may be other options available, including a short sale (selling the house for less than the full balance owed, with the permission of your lender), or a deed in lieu. In a short sale, the account will be reported to your credit as an account that was paid, but settled for less than the full balance owed. This should have less of an impact than a full foreclosure. This does require you to find a buyer for the home, but assuming your lender allows it, you can sell the home for less than the balance owed to you. The process is more involved than that, and there are other factors to consider but there are a number of Realtors and loan officers well versed in short sales that can help guide you, should you choose that path.
Another option would be deed in lieu. This is also known as deed in lieu of foreclosure. Essentially you would contact your bank and let them know that you are not able to make the payments, and believe the home is going to go into foreclosure. They may be able to modify the loan to terms that you can afford; otherwise they may accept deed in lieu. This process would involve you legally turning possession and ownership of the property back to the bank. This is typically more beneficial to the bank than a full foreclosure, as they don’t have to go through the entire legal proceedings of a foreclosure. Additionally they can legally take possession much sooner, and can therefore begin the process of attempting to sell the home faster. Again, this process is more complicated, and a deed in lieu may only be a last resort prior to foreclosure, but either option would be more beneficial to both you and your lender than simply vacating the home and mailing them the keys. By doing so you are not legally transferring possession to the bank, and you would still be subject to the entire foreclosure process months down the line.