Generally, the best way to handle a past divorce and an existing mortgage is to have your spouse refinance or sell the property. An FYI, I have yet to see a bank remove an ex-spouse from the loan liability. By refinancing or selling the property your name is then removed from the loan and you are no longer liable for the loan or on the title any longer.
If you are ever faced with a divorce my best advice is to speak with an attorney and if you have questions about refinancing a loan, speak with a mortgage professional. Both will be able to keep you out of trouble as far as divorce and mortgages go.