It should be noted that this "sending keys back to the bank" thing is a rather funny US-specific possibility.
In most of the remaining parts of the world (speaking for Germany myself, for example) you can't just drop a houses' keys into the banks' mailbox and be done with the entire mortgage. Instead, you are bound to a mortgage that's suddenly not backed by sufficient securities anymore and it's up to the bank to decide whether they just ignore this situation, attempt to somehow mitigate the additional risk by raising rates or requesting additional cash from you, or whether they try to liquidate the security in order to limit their losses and then come after you to cover the outstanding balance.
So if you want to do the bankruptcy play in case the bank requests your last shirt, you actually need to go on full personal default, with all the negative side effects that has on your credit rating everywhere else and all the subsequent obligations like the necessity to show good financial behavior for X years to have your debts be deleted eventually.