Bismihi ta'ala
Conditions for Islamic divorce according to Shi'ah law are:
1. Wife is outside of her menstrual cycle, not having had sex with husband since previous cycle.
2. Having agreed on type of divorce.
3. There be a minimum of two strictly religious, pious, righteous men. Physically present to witness the reciting of the formula of divorce.
4. The husband reciting the formula of divorce in formal Arabic, with correct pronunciation, or authorising someone else to conduct it on his behalf.
5. If wife is forfeiting, she must also authorise.
For detailed information, read:
https://www.sheikh-alsalami.org.au/2017/10/23/divorce-service-english/
As for when is it permissible, if all avenues have been exhausted, and it has reached to irreconcilable stage, then wife/husband can divorce.
And Allah knows best.