Deep brain stimulation triggered by a patient-specific neural biomarker of a high-symptom state may better control symptoms of major depressive disorder compared to continuous, open-loop stimulation. This protocol provides a workflow for identifying a patient-specific neural biomarker and controlling the delivery of therapeutic stimulation based on the identified biomarker.