The specific DEGs could act as biomarkers and potential therapeutic targets of depression in cancer comorbidity for future studies through the pathways of IL-17 or histidine metabolism. Here, IL17A is linked to depressive symptom measurement.