Medical staff have experienced anxiety, sleep disturbances, and suicide due to the COVID-19 epidemic. Thus, this study examined the relationship between corona disease anxiety, sleep problems, and suicidal ideation in medical staff and how resiliency and cognitive flexibility mediate it. This descriptive-analytical cross-sectional study examined medical staff. In 2022, participants were affiliated with Hamadan University of Medical Sciences, Iran educational and treatment centers. Sampling was done at primary COVID-19 treatment centers. Data was collected using validated instruments. Ethics were observed during data collecting. Path analysis was employed to test hypotheses. Analysis showed significant positive relationships between Corona disease anxiety and sleep disturbances (p = 0.001, β = 0.438) and suicidal ideation (p = 0.001, β = 0.310). Conversely, negative and significant associations were identified between resiliency and cognitive flexibility with sleep disturbances and suicidal ideation. The study illustrates how medical staff's psychological health is linked to COVID-19. High Corona disease anxiety causes sleep disturbances and suicidal thoughts. Resilience and cognitive flexibility modulated Corona disease anxiety, sleep problems, and suicidal thoughts. The comprehensive study focuses on medical staff mental health issues, suggesting targeted solutions.