(1) Background: The COVID-19 pandemic has highlighted attention on the importance of certain variables in predicting job performance. Among these, mental health is one of the main variables affected by this pandemic. It can have an important mediating role in predicting job performance by individual, occupational, and organizational variables, especially in the nursing community. However, there is little information about its mediation role among the predictors of job performance. This cross-sectional study aimed to examine the role of mental health as a mediating factor in the influence of self-compassion and work engagement on ICU nurses’ job performance during the COVID-19 pandemic, as well as the moderating effect of gender on all model relations. A survey of 424 ICU nurses (men 193 and women 231) was undertaken in three Coronavirus hospitals in Isfahan, Iran. (2) Method: Questionnaires were distributed and collected among the statistical sample, and the data from the questionnaires were analyzed using AMOS24 software (version 24). The research model was evaluated in two stages (the main model and the two sub-models in two gender groups). (3) Result: The analysis revealed that work engagement (β = 0.42,p< 0.001), mental health (β = 0.54,p< 0.001) and job performance (β = 0.51,p< 0.001) were discovered to be positively related to self-compassion. Work engagement is positively associated with mental health (β = 0.16,p< 0.01) and job performance (β = 0.21,p< 0.001), and mental health is linked positively to job performance (β = 0.23,p< 0.001). Furthermore, the effects of self-compassion and work engagement on job performance are mediated by mental health. According to the findings, gender moderates the link between self-compassion and work engagement, work engagement and job performance, and self-compassion and job performance. (4) Conclusion: Mental health has a mediating role in the effect of self-compassion and work engagement on ICU nurses’ job performance. Gender also acted as a moderator in some relationships. Males are dominant in all of these relationships as compared to females.