Caring for COVID-19 patients might experience mental health challenges and there is a need to identify the underlying factors that could contribute to depression and anxiety. The aim of this study was to study relationship between coping styles, psychological factors, stress and fear of COVID-19 on depression and anxiety among frontline healthcare workers in Sabah, Malaysia. A cross-sectional study was performed amongst 344 healthcare workers in Sabah Women and Children Hospital, Kota Kinabalu, Sabah. Questionnaires corresponding to the following variables were administered: sociodemographic variables (operationalized as age and gender); psychological process variables (operationalized as psychological inflexibility, psychological mindedness, and psychological mindfulness); fear of COVID-19; stress of COVID-19; depression, and anxiety. A total of 337 participants were enrolled into this study using homogenous convenience sampling techniques and data was analyzed using SPSS version 27 and partial least square structure equation modeling (PLS-SEM). The prevalence of normal, mild, moderate, severe, and extreme severe of depression was 54.8%, 19.2% and 13.1%, 11.1%, and 1.7% respectively. Meanwhile, the prevalence of normal, mild, moderate, severe, and extreme severe of anxiety was 49.9%, 11.7%, 12.0% and 9.0%, and 17.5% respectively. The findings show that emotion-focused coping (β = 0.16, t = 2.63, p = 0.01) and psychological inflexibility (β = 0.50, t = 7.34, p = 0.00) have a significant positive effect on anxiety; meanwhile, problem-focused coping have a significant negative effect on anxiety. Additionally, stress of COVID-19 coping (β = 0.13, t = 2.36, p = 0.02), emotion-focused coping (β = 0.17, t = 2.97, p = 0.00), psychological inflexibility (β = 0.46, t = 6.67, p = 0.00), and psychological mindedness (β = 0.16, t = 2.46, p = 0.01) have a significant positive effect on depression. Meanwhile, problem-focused coping had a significant negative effect on depression (β = -0.15, t = 4.15, p = 0.00). Healthcare workers in this study experienced considerable amount of depression anxiety; and our study reported the greatest influence was related psychological inflexibility. Therefore, psychological support strategies need to be organized and implemented to improve mental health among healthcare workers during the COVID-19 pandemic.