Swartz wrote that "depressed mood is like that, only it doesn't come for any reason and it doesn't go for any either."
Among Internet gurus, Swartz was considered a pioneer of efforts to make online information freely available.
"Playing Mozart's Requiem in honor of a brave and brilliant man," tweeted Carl Malamud, an Internet public domain advocate who believes in free access to legally obtained files.
Swartz aided Malamud's own effort to post federal court documents for free online, rather than the few cents per page that the government charges through its electronic archive, PACER. In 2008,
The New York Times
reported, Swartz wrote a program to legally download the files using free access via public libraries. About 20% of all the court papers were made available until the government shut down the library access.
The FBI investigated but did not charge Swartz, he wrote on his own Web site.
Three years later, Swartz was arrested in Boston and charged with stealing millions of articles from a computer archive at the Massachusetts Institute of Technology. Prosecutors said he broke into a computer wiring closet on campus and used his laptop for the downloads.
Experts puzzled over the arrest and argued that the result of the actions Swartz was accused of was the same as his PACER program: more information publicly available.
The prosecution "makes no sense," Demand Progress Executive Director David Segal said in a statement at the time. "It's like trying to put someone in jail for allegedly checking too many books out of the library."
Swartz pleaded not guilty to charges including wire fraud. His federal trial was to begin next month.
According to a federal indictment, Swartz stole the documents from JSTOR, a subscription service used by MIT that offers digitized copies of articles from academic journals. Prosecutors said he intended to distribute the articles on file-sharing websites.
He faced 13 felony charges, including breaching site terms and intending to share downloaded files through peer-to-peer networks, computer fraud, wire fraud, obtaining information from a protected computer, and criminal forfeiture.
JSTOR did not press charges once it reclaimed the articles from Swartz, and some legal experts considered the case unfounded, saying that MIT allows guests access to the articles and Swartz, a fellow at Harvard's Safra Center for Ethics, was a guest.