A system is described for detecting and/or treating depression that may be incorporated into an implantable device such as a cardiac rhythm management device. The device may determine that depression is present by analysis of heart rate variability measured using the cardiac sensing channels of the device and/or by detection of blood-borne factors that are associated with depression. If depression is detected, the device may be configured to automatically delivery therapy such as neuromodulation and/or drug delivery.