University students face many challenges that affect their mental health during this stage. Psychosocial aspects, such as resilience, help to address the imbalance they often experience in their daily lives. The aim is to find the relationship between students' resilience and their mental health, while analyzing the mediating role played by personality factors between these variables. To carry out this study, a sample of 692 university students belonging to different Degrees of Education answered three questionnaires voluntarily, one to measure resilience (RS-14), another to measure personality factors (Big Five) and another to measure mental health (MH-5). A mediational model based on Structural Equations was proposed for this analysis. The results indicate that resilience is able to significantly predict students' mental health directly and that it also predicts all personality components assessed in students. Furthermore, it was found that of all the personality factors examined, only neuroticism was found to be predictive of mental health. Furthermore, resilience is positioned as a mediating factor between mental health and personality factors. Specifically, resilience emerged as a significant mediator in the relationship between agreeableness, neuroticism and openness and mental health. Moreover, all other personality factors are directly related to resilience. In the same way, the results also confirm the need to train pre-service teachers in psychosocial factors in order to prevent future problems in their subsequent professional performance.