That is: "This guy I know is a sadistic wife-beater. So yesterday I punched him in the face. It didn't do anybody any good, but I got some gratification from it. I know that ordinarily, walking up to someone and socking them is a bad thing to do. But this guy deserves it. Doesn't that make it better?"
No. There are many possible justifications for harming a person, but deserving and gratification are not among them.1 Harm to a human being has, in and of itself, a basic ugliness. To take away a person's control over their own well-being is a travesty. It can only be justified in the prevention of a greater evil.
Harming a person in direct response to their initiation of force is justified, for the evil of the act that it seeks to prevent and/or deter is far greater than its own. Murderers can be put to death to keep them from murdering again. But if there is reason to believe that the murderer will never again commit such an act (which could well be the case for many one- time murderers, having rid themselves of the one person who sent them over the edge), applying punishment would be worse than useless. It would take one life, and save none.
If you have good reason to believe that punching the wife-beater will get him to stop his evil ways, go ahead. (Better yet, keep your hands clean of vigilantism and bring in the law.) But if not, you will have done more harm than good in two ways: He is harmed and nobody is helped, and he may take out his anger over your act on his wife, or on you.
The only moral object of punishment is prevention. What the person deserves does not matter.
1. Thoughts:
Revenge and Justice