The IRLILR should not be affected in this case by your matrimonial status however it is intended for people settling in the country. In effect the IRLILR does lapse after 2 years of living abroad however there may be exceptions depending on individual circumstances.
I would advise to contact you citizen advice bureau for free legal advice if your are still in the UK or the nearest British embassy/consulate for clarifications.