The death of Aaron Swartz, the 26-year-old programming prodigy and digital rights activist who committed suicide Friday, was stunning and upsetting. Swartz, who helped invent RSS as a 14-year-old and contributed to the creation of Reddit, was a passionate believer in the principle of open information. He was being prosecuted for allegedly downloading millions of academic papers collected by JSTOR, which sells digital access to scholarly journals, from the MIT archive. Swartz was said to be very upset about the charges, which carried a sentence of up to 35 years in jail and $1 million in fines. He was also said to be struggling with depression.

Mashable outlines the controversy over the criminal charges against Swartz, which his family calls “intimidation and prosecutorial overreach,” and some of the tributes offered by tech leaders, including this description of Swartz from a Harvard academic and activist: “A kid genius. A soul, a conscience, the source of a question I have asked myself a million times: What would Aaron think?”

What cuts even closer to the quick is the blog Swartz himself wrote in 2007 to describe his experience with the illness and depression that plagued him. I hope you’ll read it.

Swartz begins by apologizing for not keeping up with his blog, and admits that he’s been ill with several things, including stomach pain and migraine.

I have a lot of illnesses. I don’t talk about it much, for a variety of reasons. I feel ashamed to have an illness. (It sounds absurd, but there still is an enormous stigma around being sick.) I don’t want to use being ill as an excuse. (Although I sometimes wonder how much more productive I’d be if I wasn’t so sick.)

And he writes with painful eloquence about being depressed, about the pervasive sadness and the frustration of being unable to feel the joy everyone else seems to feel.

At best, you tell yourself that your thinking is irrational, that it is simply a mood disorder, that you should get on with your life. But sometimes that is worse. You feel as if streaks of pain are running through your head, you thrash your body, you search for some escape but find none. And this is one of the more moderate forms.

There’s more. But he comes back, in the end, to stigma, citing an economist who notes that depression, which affects 1 in 6 people, is the greatest impediment to happiness today:

Sadly, depression (like other mental illnesses, especially addiction) is not seen as “real” enough to deserve the investment and awareness of conditions like breast cancer (1 in 8) or AIDS (1 in 150). And there is, of course, the shame.

Swartz’s suicide is another reminder that genius is often no match for depression, and that the shame that inhibits both treatment and research can rob us all of great potential.