You convert your Extension of Stay on the day of your divorce or leave Thailand. Don't count on the "Extension denied, 7 days to leave Thailand" stamp as you should have planned your stay status in advance of the divorce, a divorce doesn't just happen overnight.