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 is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
A husband stating that he is going to write the word divorce is not considered as a divorce but it is a promise of writing the word divorce. Even when the husband writes the word divorce, it is not considered as divorce according to the most preponderant opinion of the scholars unless he intends divorce by writing it. So, if your husband wrote the word divorce while intending it, then it is considered as one divorce. If this is the first divorce or the second divorce, it is a revocable divorce and it is acceptable for him to take you back without a new contract as long as you are in the waiting period. However, if he did not intend divorce by writing the word divorce, it is not considered a divorce.
It should be noted that marriage is a strong contract, as Allaah named it a strong covenant. Allaah Says (which means): {…and they have taken from you a firm and strong covenant?}[Quran 4:21]. So the spouses should not expose this relation to what could cause a separation or divorce. They should have mutual understanding and respect with regard to any problems that might arise. So, the husband should not hasten for divorce; rather, there are steps that he should follow before divorcing even if when the wife is disobedient. However, it is not permissible for a woman to ask for divorce just because of a dispute. So you should endeavour to reconcile as much as possible.
However, if the woman fears harm by staying with her husband or that she hates staying with him because she fears he will be neglectful about her rights, it is permissible for her to ask for divorce by paying him a compensation, as the wife of Thaabit Ibn Qays did.
Finally, it should be noted that it is not permissible for a woman to go out of her husband's house without his permission, otherwise she is considered disobedient, unless she fears harm by staying home in which case she may go out in order to avoid the harm.
We advise you both to fear Allaah and reconcile. You should both seek the help of the pious people of your relatives or take your matter to an Islamic centre in order to solve the problem and not leave the situation pending.
Allaah Knows best.