Our findings suggest that depression in breast cancer patients may lead to decreased acetate production, compromised CD8+ T cell infiltration, and ultimately, an increased risk of metastasis. Here, CD8A is linked to major depressive disorder.