IntroductionPediatricians in training are a population at risk for anxiety and depression: they face long working hours, they are confronted with the suffering and death of a vulnerable population and may have personal characteristics that put them in danger. Nonetheless, few studies have looked at their prevalence and associated factors. We aimed to compare demographic, professional activities, adversities and perfectionism personality features between a group of pediatricians in training with depression and/or anxiety and a group of pediatricians in training without depression nor anxiety and, to identify the variables that increase the probabilities of depression and/or anxiety in pediatricians in training.MethodsPediatric residents who voluntarily answered an online survey distributed via personal and institutional social media channels from October 2019 to April 2021, as part of a cross-sectional study with medical specialists and residents from Mexico were included. Demographic information, professional activities and adversities, perfectionism personality features (Multidimensional Perfectionism Scale), depression and anxiety (ICD-11 PHC) were evaluated. For comparison purposes Chi-square tests (χ2) and independent sample t-tests were used. A logistic regression analysis was used to identify those variables that increase the probabilities of depression and/or anxiety.Results934 pediatric residents answered the survey. 11.6% reported having depression and 20% anxiety. Being single, a history of anxious or depressive episodes, being the resident in charge of a patient who died, aggressions from colleagues and a high concern for errors were associated with current depression and/or anxiety.DiscussionScreening for depressive and anxious symptoms should be routinely performed from entry to the residency to favor early intervention. A shift from promoting perfectionism to a more compassionate training could serve a population facing so many adversities.