Given the dynamic nature of mental health throughout the lifespan, this study examined associations among several psychosocial factors, single-nucleotide polymorphisms (SNPs) for brain-derived neurotrophic factor (BDNF), neuropeptide y (NPY), and oxytocin receptor (OXTR), and mental health among older (N=88) and younger adults (N=369). Older age was related to lower stress and depression, greater social identity and resilience, and various coping styles. Moreover, OXTR moderated the direct relationship between age and depression, as well as the mediating roles of identity and coping in that relation. OXTR also moderated the mediating role of coping in the relation between social identity and depression. However, age also moderated this relation both directly, and indirectly through the mediating role of resilience. These results suggest that identity, resilience, coping and OXTR may be protective to mental health, but that these factors may impact the mental health of older and younger adults differently.