I am not sure there is confusion as to what to do-but that there are many options and factors to consider and each case or circumstance is different.
If you are going bankrupt, (If I am not mistaken you are considering this) then it does not really matter whether you sell with the banks permission or just go bankrupt (they get whatever they get) and as you are going bankrupt,what ever the shortfall is, won't concern you.
If you were trying to come to a deal with the bank, without declaring bankruptcy, then it would be better to sell to minimise cost incurred by the bank in selling and to maximise sale price for you (given you will be taking this deficit as an unsecured loan) something that the bank won't really care about.
I am pretty certain that if you search these threads really well and thoroughly using different words/phrases, you will get lots of info to help you formulate the best way forward for you and your own circumstances.
Best of luck with it.