What happens if you go bankrupt trying to pay the bank?
From my understanding they all go back to the bank. They all then actually got auctioned off (I thought they went back for sale like at the start of the game).


  Should you owe the Bank, instead of another player, more than you 
  can pay (because of taxes or penalties) even by selling off buildings 
  and mortgaging property, you must turn over all assets to the Bank. In 
  this case, the Bank immediately sells by auction all property so taken, 
  except buildings. A bankrupt player must immediately retire from the 
  game. The last player left in the game wins. 


Taken from the final Bankruptcy page from the offical Hasbro Rules

I would add that I would treat the properties as unmortgaged for the purposes off re-selling them and deem that as the mortgage loan was owed to the bank, they would write off that debt if required.