The current study aims to investigate the meaning of life, psychological well-being, self-care, and social capital, with depression and death anxiety in the elderly living in nursing homes through the mediating role of loneliness. The statistical population included all the elderly aged at least 60 years living in Tehran, Qazvin and Zanjan, Iran in 2020, among whom 489 (273 men and 216 women) were selected using convenience sampling method. Participants filled out Steger’s Meaning of Life, Ryff and Singer’s Psychological Well-Being Scale, Söderhamn et al.’s Self-Care Ability, Nahapiet and Ghoshal’s Social capital, Beck’s depression, Templer’s Death Anxiety, Russell et al.’s Loneliness questionnaires. The results indicated that there is a significant relationship between the meaning of life, psychological well-being, self-care, and social capital, with depression through the mediating role of loneliness. Besides, there was a significant relationship between the meaning of life, psychological well-being, self-care, and social capital, with death anxiety through the mediating role of loneliness. Moreover, the results of path analysis showed that the hypothesized model of the current study has an excellent fit in the study sample.