Antidepressants have been shown to improve longevity in C. elegans. It is plausible that orthologs of genes involved in mood regulation and stress response are involved in such an effect. We sought to understand the underlying biology. First, we analyzed the transcriptome from worms treated with the antidepressant mianserin, previously identified in a large-scale unbiased drug screen as promoting increased lifespan in worms. We identified the most robust treatment-related changes in gene expression, and identified the corresponding human orthologs. Our analysis uncovered a series of genes and biological pathways that may be at the interface between antidepressant effects and longevity, notably pathways involved in drug metabolism/degradation (nicotine and melatonin). Second, we examined which of these genes overlap with genes which may be involved in depressive symptoms in an aging non-psychiatric human population (n=3577), discovered using a genome-wide association study (GWAS) approach in a design with extremes of distribution of phenotype. Third, we used a convergent functional genomics (CFG) approach to prioritize these genes for relevance to mood disorders and stress. The top gene identified was ANK3. To validate our findings, we conducted genetic and gene-expression studies, in C. elegans and in humans. We studied C. elegans inactivating mutants for ANK3/unc-44, and show that they survive longer than wild-type, particularly in older worms, independently of mianserin treatment. We also show that some ANK3/unc-44 expression is necessary for the effects of mianserin on prolonging lifespan and survival in the face of oxidative stress, particularly in younger worms. Wild-type ANK3/unc-44 increases in expression with age in C. elegans, and is maintained at lower youthful levels by mianserin treatment. These lower levels may be optimal in terms of longevity, offering a favorable balance between sufficient oxidative stress resistance in younger worms and survival effects in older worms. Thus, ANK3/unc-44 may represent an example of antagonistic pleiotropy, in which low-expression level in young animals are beneficial, but the age-associated increase becomes detrimental. Inactivating mutations in ANK3/unc-44 reverse this effect and cause detrimental effects in young animals (sensitivity to oxidative stress) and beneficial effect in old animals (increased survival). In humans, we studied if the most significant single nucleotide polymorphism (SNP) for depressive symptoms in ANK3 from our GWAS has a relationship to lifespan, and show a trend towards longer lifespan in individuals with the risk allele for depressive symptoms in men (odds ratio (OR) 1.41, P=0.031) but not in women (OR 1.08, P=0.33). We also examined whether ANK3, by itself or in a panel with other top CFG-prioritized genes, acts as a blood gene-expression biomarker for biological age, in two independent cohorts, one of live psychiatric patients (n=737), and one of suicide completers from the coroner's office (n=45). We show significantly lower levels of ANK3 expression in chronologically younger individuals than in middle age individuals, with a diminution of that effect in suicide completers, who presumably have been exposed to more severe and acute negative mood and stress. Of note, ANK3 was previously reported to be overexpressed in fibroblasts from patients with Hutchinson-Gilford progeria syndrome, a form of accelerated aging. Taken together, these studies uncover ANK3 and other genes in our dataset as biological links between mood, stress and longevity/aging, that may be biomarkers as well as targets for preventive or therapeutic interventions. Drug repurposing bioinformatics analyses identified the relatively innocuous omega-3 fatty acid DHA (docosahexaenoic acid), piracetam, quercetin, vitamin D and resveratrol as potential longevity promoting compounds, along with a series of existing drugs, such as estrogen-like compounds, antidiabetics and sirolimus/rapamycin. Intriguingly, some of our top candidate genes for mood and stress-modulated longevity were changed in expression in opposite direction in previous studies in the Alzheimer disease. Additionally, a whole series of others were changed in expression in opposite direction in our previous studies on suicide, suggesting the possibility of a "life switch" actively controlled by mood and stress.