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.
It is the right of a wife that her husband treats her on reasonable terms, and having anal sex with her is forbidden and it is in opposition to good marital relations. Please refer to Fatwa 87038.
You are obliged to repent for letting him do that. You are sinful even for the times he forced you to have anal sex unless the matter reached coercion and you believed that it was most likely that he would carry out his threats. For explanation of coercive compulsion, please refer to Fatwa 90215.
Accordingly, it is an obligation to advise him to repent to Allaah and stop doing such an evil act. If he repents, then praise be to Allaah; in that case, it is not permissible for you to ask for divorce as there is no sound reason for doing so. A wife is not permitted to ask for divorce unless she has a sound reason. For more benefit, please refer to Fatwa 131953.
However, if he does not stop that, then you have the right to ask for divorce. Some scholars are of the view that if the spouses agree to have anal sex, it becomes an obligation to separate them. Shaykh Al-Islam Ibn Taymiyyah said: “If a husband has sex with his wife in her anus, it is an obligation to punish them with a punishment that would deter them. If it is known that they would not be deterred, then it is an obligation to separate them.” This is evidence that this matter is very grave.
In case of divorce, you have the right to custody of your children as long as you do not remarry. If you remarry, then the custody is passed on to the closest female relative in the sequence named by the jurists as clarified in Fatwa 84618.
As regards the children, their father is obliged to provide for their needs in all cases. If there is a dispute, you may take the matter to an Islamic center.
Allaah Knows best.