Dear
@Ant,
Despite the divorce of your marriage, you can retain the right of residence in Germany and get your residence card (Aufenthaltskarte) extended if your marriage existed for at least 3 years, including at least 1 year in Germany, before the divorce proceedings were initiated and you yourself are an employee.
Furthermore, despite the divorce, you still have the right of residence if you have been granted the right of access to your minor children in Germany only, by virtue of an agreement with your ex-wife or by a court ruling.
In order to renew your residence card, you must present your employment contract, your last three pay slips, the divorce decision, the agreement with your ex-wife or the court ruling of the right of access to the Immigration Authority when applying for the extension of your residence card.
Best regards
WKZB1