While I don't think Aaron Swartz should've been prosecuted (or at least not charged with everything they did), this statement in general is not the job of the prosecutors. If it were, then many charges would have to be dropped/reduced in the case of people with mental illness (where it's not considered part of the defense proper) or other medically compromised individuals. That's kind of an absurd position to take. If X suffers from clinical depression, but has committed (or is accused of committing) some serious crime, should the charges be reduced or the sentence reduced based on these circumstances? Or should they be charged and considered the same as anyone else would be for the same crimes?
This reeks of the same kind of abuse of prosecution as the affluenza case.
But having severe depression or being schizophrenic, on its own, is not a good justification for changing/reducing charges and consequences (sadly, consequences in the US are punishments as there's little focus on rehabilitation). If anything, it could reasonably affect the sentencing to account for the riskier consequences of placing a person with that mental condition into a medium or high security prison or general population, but not the selection of charges by the prosecutor.