It's hope that hurts. It's the expectation that does it.
Tell a man there's absolutely nothing you can do, you would be as successful as an ice cream cone in hell and less useful, and he'll tell you, yeah, but I've got to try because I'd as soon die with a weapon in hand as running to nowhere. And if he does accomplish anything, however small, he feels worthwhile.
Tell a man we're going to hold them off and he's probably not going to believe you. But be the respected general of the Shitennou and tell a man that you can stall them in the castle's protective labyrinth and fight the hordes of youma with your superior position and knowledge of the layout and you can hold them off for long enough, and he'll want to believe you. He'll understand he's going to die even before you tell him and won't be waiting for a miracle rescue at the last moment, certainly not in his heart and probably not even in his mind.
He'll be at peace with it, if with the words "someone needed to do it" than "trying is always worth it". He might even smile as he's dying as he sees you, his prince's Shitennou.
He won't ask you if it worked. He won't want to know. He'd believe it worked because he would not want to know.
For all that justice is an artificial concept, the universe was kind for letting him die then. If he'd seen what happened next and how spectacular his failure was, he'd have been pissed.