"He attacked and killed an evil. He did the right thing." -- With full knowledge it comes at the risk of endangering well-meaning guards who would stop him now or later.
"Someone else decided to flag him according to their own personal system of laws, and the paladin neither controls nor decides when that happens" -- Is he so thoughtless he cannot have foreseen this outcome as a possibility?
" He did what he needs to do." -- If what he needs to do is kill evil, at any cost, including killing a well-meaning guard who would seek to bring him to legal justice.
"If others then do things, then they do things, but it's not his fault, any more than it is his fault that the guard (who as Isildur pointed out you are entirely ignoring and considering as an ooc mob not as a sentient being) decided to attack him." -- Really? He's not the cause of it? I'm completely certain that if he did not break the law he would not have been warranted and it would not have happened. Is it not his responsibility as a paladin to think ahead for the sake of others?
" Frankly, why shouldn't the *guard* be dying for attacking a good aligned person?? It's the guard's fault, twice!" -- Because it could have been avoided, but apparently it wasn't worth preventing.
"Can the paladin feel bad about it? Obviously. Should he try to avoid killing goods? Naturally. Is it his fault when goods attack him and die due to no fault of his own? Nope." -- I don't see how you can buy that. That is like if I went vigilante, killed a rapist, then the police sought to bring me to justice, assaulted me, and were shot and killed. That's not my fault even though I know there's a chance I get caught and that might happen?