The story is built around the "analytic rumination hypothesis" for depression advanced by Andrew Thompson and Paul Andrews. Here's the quote in the context of the penultimate paragraph:
This line of research led Andrews to conduct his own experiment, as he sought to better understand the link between negative mood and improved analytical abilities. He gave 115 undergraduates an abstract-reasoning test known as Raven’s Progressive Matrices, which requires subjects to identify a missing segment in a larger pattern. (Performance on the task strongly predicts general intelligence.) The first thing Andrews found was that nondepressed students showed an increase in “depressed affect” after taking the test. In other words, the mere presence of a challenging problem — even an abstract puzzle — induced a kind of attentive trance, which led to feelings of sadness. It doesn’t matter if we’re working on a mathematical equation or working through a broken heart: the anatomy of focus is inseparable from the anatomy of melancholy. This suggests that depressive disorder is an extreme form of an ordinary thought process, part of the dismal machinery that draws us toward our problems, like a magnet to metal."Anatomy of focus" refers to the ventrolateral prefrontal cortex (VLPFC), a part of the brain that seems to be important for maintaining attention (among other things). Lehrer reports that "[s]everal studies found an increase in brain activity (as measured indirectly by blood flow) in the VLPFC of depressed patients."
There are other good quotes near the end too. For example, after talking about the striking correlation between creative production and depressive disorders, Lehrer quotes neuroscientist Nancy Andreasen
Why is mental illness so closely associated with creativity? Andreasen argues that depression is intertwined with a “cognitive style” that makes people more likely to produce successful works of art. In the creative process, Andreasen says, “one of the most important qualities is persistence.” Based on the Iowa sample, Andreasen found that “successful writers are like prizefighters who keep on getting hit but won’t go down. They’ll stick with it until it’s right.” While Andreasen acknowledges the burden of mental illness — she quotes Robert Lowell on depression not being a “gift of the Muse” and describes his reliance on lithium to escape the pain — she argues that many forms of creativity benefit from the relentless focus it makes possible. “Unfortunately, this type of thinking is often inseparable from the suffering,” she says. “If you’re at the cutting edge, then you’re going to bleed.”He also talks about "the virtue of self-loathing", one of the symptoms of depression, and quotes Roland Barthes: "A creative writer is one for whom writing is a problem."
For a critique of Lehrer's piece, see Edward Champion's "Jonah Lehrer: A Malcolm Gladwell for the Mind", February 28, 2010.