Murdering an adulterer used to be called a crime of passion and at least at a point in the 20th century, it was justifiable homicide in America.
Murdering a rapist wouldn’t require a defense of temporary insanity. What’s the status on the case in Texas where the father killed the farmhand who’d molested his daughter?
In North Dakota, one is legally permitted to use lethal force to intervene on behalf of a third party to prevent/mitigate the serious bodily injury or death of that third party.
Rape is included in the definition of "serious bodily injury".
Of course my wife is faithful, ergo, the intervention would be justifiable under the letter of the law.
No insanity defense is necessary, instead it would be the lawful use of force on behalf of one who is being seriously injured.
Laws may vary in your jurisdiction. Learn them.