Greetings.
Mortgage debt remains even after the bank which holds the mortgage fails. When your bank goes bankrupt, your mortgage is sold to another bank or - if your contract allows for it - terminated ahead of schedule.
Whether your assets held at the failed bank can be used to cover your mortgage debt is not clearly regulated. Some mortgage contracts include a clause which specifically excludes the possibility of your assets being used to settle your debt.
That means that if you hold 60,000 francs in a savings account at a bank which goes bankrupt and the bank cannot pay your 60,000 francs back, you still won't be able to credit that amount to your mortgage.
If a mortgage contract includes this clause, you could try asking the bank to remove it before you mortgage your home or renew your mortgage contract.
Best regards from Moneyguru,
Bank failures: What happens to your money?