All perfect praise be to Allaah, the Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
It is permissible for you to divorce your (first) wife officially and then take her unofficially without documenting this revocation. However, the divorce in this case will be valid, as the Prophet said: “There are three matters in which seriousness is serious and joking is serious: marriage, divorce, and taking back [one’s wife].” [Abu Daawood, At-Tirmithi and Ibn Maajah]
In this case, divorce is classified under the divorce out of jesting rather than coercion. This is because you have the right either to keep her as your wife or actually divorce her regardless of your desire to marry another woman or the fact that civil laws do not permit it.
However, we are of the view that divorcing your wife officially and taking her back unofficially without documentation will result in bad consequences that will ultimately lead to harm for both of you. For example, in terms of inheritance distribution, neither of you will inherit the other because you are officially divorced.
Similarly, if you have children from her you will find it difficult to register them as your children.
So, the best solution for this problem is the judgment of Allaah The Exalted, Who Says (what means): {Either keep [her] in an acceptable manner or release [her] with good treatment.} [Quran 2:229]
Perhaps Allaah The Almighty will make your first wife better for you.
Allaah Knows best.