Assume that he is, indeed, suffering from depression, and attempts to treat it have not been particularly successful. Does that make a difference?
I do not think he is suffering from depression. I think he is "suffering" from some type of short-circuiting. Perhaps a genetic deficiency which leads to "meditations in morbidity" combined with reading too much of the wrong stuff and too little feedback from people in the real world (think LW readers with no job and little network). This "data-poverty" leading to delusions of grandeur.
He needs a girlfriend, a job and a real problem to work with.
In secret, an unemployed man with poor job prospects uses his savings to buy a large term life insurance policy, and designates a charity as the beneficiary. Two years after the policy is purchased, it will pay out in the event of suicide. The man waits the required two years, and then kills himself, much to the dismay of his surviving relatives. The charity receives the money and saves the lives of many people who would otherwise have died.
Are the actions of this man admirable or shameful?