This study aimed to investigate the impact of work-family conflict (WFC) and family-work conflict (FWC) on depression and anxiety among Chinese professionals, with a specific focus on the mediating roles of perceived social support (PSS) and general self-efficacy (GSE). Using nationwide data from the 2021 China Residents' Psychology and Behavior Survey, a sample of 4,579 employed individuals aged 18 to 60 was analyzed. Descriptive statistics, Spearman correlation analysis, and mediation analysis were conducted to systematically examine the effects of WFC and FWC on depression and anxiety levels. A bootstrap procedure with 5,000 resamples was applied to assess the stability and significance of the mediation effects. The analysis revealed a significant positive correlation between WFC and FWC (r = 0.715, p < 0.01). Both WFC and FWC were negatively associated with PSS (r = -0.166 and - 0.285, respectively) and GSE (r = -0.127 and - 0.239, respectively), while showing positive associations with depression (r = 0.398 and 0.468, respectively) and anxiety (r = 0.403 and 0.479, respectively) (all p < 0.01). Mediation analysis further demonstrated that PSS and GSE significantly mediated the relationships between WFC/FWC and mental health outcomes (p < 0.001). The study reveals the mechanisms through which WFC and FWC affect mental health, proposing a new perspective that integrates external resources (PSS) and internal resources (GSE), while addressing a critical gap in research within the Chinese cultural context. It highlights the significant negative impact of WFC and FWC on the mental health of Chinese professionals and underscores the key mediating roles of PSS and GSE in these relationships. The findings provide important insights into the mental health challenges associated with high-intensity work environments and offer an empirical basis for developing targeted intervention strategies to mitigate these effects.