Due to increasing pressures from work, family, and society, mental health problems have become an urgent challenge in recent years. Individual resilience—a person’s capacity to cope with considerable change, adversity, or risk—can help decrease the likelihood of mental health problems and recover to a healthy state quickly. Despite its importance for individuals’ mental health, resilience has not received enough attention in the literature. Therefore, using the Myers-Briggs Type Indicator (MBTI), we aim to investigate the influence of personality traits on individual resilience in the mental health context. Meanwhile, based on trait activation theory, we consider the structural social capital as a trait-relevant situational cue and explore its moderating effect on the relationship between personality traits and individual resilience. We trained a deep learning model to infer a user’s personality traits from user-generated textual content, constructed a rule-based algorithm to evaluate individual resilience, and used social network analysis to measure structural social capital. And then we tested our hypotheses using a pooled regression model based on panel data. The results indicated that higher individual resilience is related to higher extroversion, feeling, and perceiving relevant personality traits. Introverts and judgers become more resilient when structural social capital is present. Our findings reveal the important role that personality traits (nature) and structural social capital (nurture) play in shaping and influencing individual resilience. The study offers valuable insights for community managers to identify potential users with low levels of resilience and give them extra care and help.