Wa `alaykum As-Salamu wa Rahmatullahi wa Barakatuh
Anal intercourse is haram and forbidden by the explicit statement of the Prophet (peace be upon him).
So, you committed a grave sin by resorting to this heinous act; you ought to repent and seek forgiveness of Allah. Repentance proper entails the following steps: feeling deep remorse; refraining from such actions; resolving in your mind never to repeat the same. You may also do well to expiate for the sin by offering charities to the poor. You may give whatever amount you can afford to.
If your wife pledged that if you do this act, she will be divorced from you, she could redeem herself by feeding ten poor persons or fasting three days.
That should not be a reason for her to divorce unless you insist on committing such perversions.
Almighty Allah knows best.
Views expressed by hosts/guests on this program (live dialogue, Facebook sessions, etc.) are their own and their appearance on the program does not imply an endorsement of them or any entity they represent.