If you can leave the relationship without incurring an unacceptable cost (e.g. loss of parental custody or assets you need to live comfortably), then do it. Don't hesitate. Your intrinsic worth and dignity as a person, and right not to be mistreated, is no less than that of a woman. Even if being abused doesn't take a serious physical toll (though some men are indeed murdered or maimed by their wives), it'll ruin your mental and emotional health, which can shorten your lifespan and make the time you do have left hardly worth living.
If you can't leave, then either mitigate or deter the misbehavior.
Mitigation could entail, for example, checking out. In other words, spending as little time at home as you possibly can. Wearing headphones and listening to music or a podcast at home. Taking long phone calls at home so that your wife feels obliged to hold her tongue until you are finished. Perhaps go around with a Bluetooth in your ear so she's left guessing whether you are on the phone or not. Or, mitigation could mean taking care of little things that you know tend to set off your abusive wife. For example, taking out the trash or whatnot.
If you feel sexually dependent on your abusive wife and lack the willpower for sexual abstinence, then pick up a discrete porn habit. Morally speaking, a partner who chooses to seriously abuse you has chosen to sever the marital bond, so it wouldn't be completely immoral to have an affair under these circumstances, but again, it may not be advisable if our misandrist court system makes it prohibitively costly to do something that would cause her to divorce you.
Deterrence means credibly signaling to your wife that there's a price to be paid if she chooses to escalate. For example, filming her and threatening to post the footage online if she goes ballistic. Retain any footage, such as by uploading it to a cloud account your wife doesn't know about/can't access, as evidence in any future court proceedings or for the "court" of public opinion.
Physically restraining your violent wife counts as mitigation, not deterrence, since you've given her no particular reason not to try again in the future. Though, if she feels humiliated by being overpowered, then it might sometimes deter.
While it's not immoral to hit a woman after she hit you first, our law is rife with double standards and you would likely end up being arrested while she gets a pass. If you do elect to go down the road of physically harming her to deter future violence, then I would suggest a strong warning first. For example, if she throws a plate at you, then throw a plate back, but narrowly miss her. If that fails and actually hurting her is the only way to deter her, then choose a method that leaves no physical trace. Something that she could go to the police and claim happened, but she wouldn't likely be able to prove it. So long as no child witnessed or heard this (i.e. it happened while they were away from the house), you should be in the clear; even if the police did arrest you, they would end up releasing you so long as you stuck to your guns and denied everything, and left behind no incriminating evidence.
This should, of course, be treated as a last resort instead of a first resort. And this should only be done in the case of physical abuse; beating the crap out of someone and talking the crap out of someone aren't equally bad, and the latter doesn't justify the former. Verbal abuse, again, has a very simple, non-violent fix in the form of tuning out with headphones or getting into your car and going to a pub.
Ideally, before any of the above, first make sure that your wife is indeed an irredeemable abuser and that the marriage can't be salvaged through counseling. Perhaps you yourself have issues to work out. If she's willing to try this option with you, then try it.