You do not have to get divorced to not pay a deceased spouse's bills or be responsible for them unless you signed that you would agree to be responsible and you don't have to sign that.
If this is something under serious consideration, it's worth a consulation with a subject matter expert and not just random internet people. Also, divorce may affect immigration status, which seems to be in play as well; and it may make visitation more difficult, although you might just not tell medical facilities about the divorce.