The 90 days you got from a non-o visa would remain valid.
If on a extension of stay based upon marriage you would have to cancel it on the day your divorce is final.
I you could qualify for a another type of extension you could change from marriage to it.
If 50 or over you could apply for one based upon retirement. If not and found a job you could change to one based upon working. You could enrol school and extend for that reason.