Data's criteria for killing aren't confined to self-defence, I'm fairly sure. Presumably he's also prepared to kill in defence of others. Fajo made it clear that in Data's present circumstances, Fajo's continued existence presents a certain threat to the well-being not just of Data but of others, too.
Treating the show just as a drama, I can buy that, though looking at it more as a real world situation it seems to me that Data could probably incapacitate Fajo and take control of the vessel. But as depicted, it works perfectly.
Armus is slightly thornier. Data summarises him as possessing 'no redeeming features' and Armus is clearly miserable in his present circumstances. Even if it were possible to alleviate those circumstances, there's excellent reason to believe that would spell serious trouble for other people. So Data's conclusion there might best be regarded as a proposed involuntary euthanasia.
The reality is that Data's specific moral criteria vary from writer to writer on the show, but those particular incidents are reconcilable with some form of ethical system that's at least benevolent in intent.