If you are so much behind your payment and bankruptcy case is about to dismiss then you have very slim chance of saving your house (sorry to hear about your situation). Did you try refinance or loan modification? If you tried all this and nothing worked out then you have left with only one option -"short sale". Try to contact a good agent who is experienced with short sale so that they can at least try to avoid from foreclosure by selling it short.
Certified Short Sale Specialist
Best of luck,
Tina Evans, Broker