Depression is characterized by a range of symptoms that can be experienced in different combinations and to different extents depending on the individual. Efforts to categorize depression by matching symptoms to physiological changes have had limited success. Here, functional MRI was used to compare whole-brain functional connectivity in 333 people with depression and a similar number of controls. Among the former, dysfunctional connectivity in limbic and frontostriatal networks fell into four biotypes that were predictive of which patients would benefit from neurostimulation therapy, indicating that this system could be used to optimize treatment strategies for different patient groups.