https://europa.eu/youreurope/citizens/residence/family-residence-rights/non-eu-wife-husband-children/index_en.htmWhat happens to your residence rights if you divorce your spouse?
If you divorce your EU spouse before they acquired permanent residence in their host country (which usually requires them to have lived there for 5 years) - you may stay if:
you have been living there for at least 1 year, and
your marriage lasted for at least 3 years before divorce proceedings started
You can also stay if you have:
custody of your child(ren) or
the right to see your minor child(ren), as long as the court ruled that such access must be in the host EU country
In the case of your right of access to a minor child, you can stay in the host EU country for as long as this is required.
To be able to stay, you must meet the same conditions for residence as EU nationals. Check the conditions and formalities for:
workers
pensioners