I don't know what the benefit of doing that would be. I always thought that if you are foreclosed on, you are still held responsible for paying the difference of what you owed on the property and what it actually sells for.
If you are going to file bankruptcy, I would think it would be more beneficial to include the mortgage in your bankruptcy so you don't have to deal with the above happening.
I would recommend getting a free consultation with a bankruptcy attorney, if you haven't already. They'll be able to advise you as to what the best course of action is with your foreclosure situation.