We previously identified a cognitive biotype of depression characterized by treatment resistance, impaired cognitive control behavioral performance and dysfunction in the cognitive control circuit, comprising the dorsolateral prefrontal cortex (dLPFC) and dorsal anterior cingulate cortex (dACC). Therapeutic transcranial magnetic stimulation (TMS) to the left dLPFC is a promising option for individuals whose depression does not respond to pharmacotherapy. Here, 43 veterans with treatment-resistant depression were assessed before TMS, after early TMS and post-TMS using functional magnetic resonance imaging during a Go–NoGo paradigm, behavioral cognitive control tests and symptom questionnaires. Stratifying veterans at baseline based on task-evoked dLPFC–dACC connectivity, we demonstrate that TMS-related improvement in cognitive control circuit connectivity and behavioral performance is specific to individuals with reduced connectivity at baseline (cognitive biotype +), whereas individuals with intact connectivity at baseline (cognitive biotype −) did not demonstrate significant changes. Our findings show that dLPFC–dACC connectivity during cognitive control is both a promising diagnostic biomarker for a cognitive biotype of depression and a response biomarker for cognitive improvement after TMS applied to the dLPFC.