We analyzed the influence of the transcription factor DeltaFosB on learned helplessness, an animal model of affective disorder wherein a subset of mice exposed to inescapable stress (IS) develop a deficit in escape behavior. Repeated IS induces DeltaFosB in the ventrolateral periaqueductal gray (vlPAG), and levels of the protein are highly predictive of an individual's subsequent behavorial deficit-with the strongest DeltaFosB induction observed in the most resilient animals. Induction of DeltaFosB by IS predominates in substance P-positive neurons in the vlPAG, and the substance P gene, a direct target for DeltaFosB, is downregulated upon DeltaFosB induction. Local overexpression of DeltaFosB in the vlPAG using viral-mediated gene transfer dramatically reduces depression-like behaviors and inhibits stress-induced release of substance P. These results indicate that IS-induced accumulation of DeltaFosB in the vlPAG desensitizes substance P neurons enriched in this area and opposes behavioral despair by promoting active defense responses.