BackgroundNeonatal death is often preceded by end-of-life medical decisions. This study aimed to determine whether the context of death − after a decision of withholding or withdrawing life-sustaining treatment (WWLST) or despite maximum care − was associated with subsequent risk of parental anxiety or depression. The secondary objective was to assess parents’ perceptions of end-of-life care according to death context.MethodsProspective single center observational study of all neonatal deaths in a neonatal intensive care unit over a 5-year period. Data were collected during hospitalization and from face-to-face interviews with parents 3 months after the infant’s death. Anxiety and depression were assessed using Hospital Anxiety and Depression Scale (HADS) questionnaires, completed by parents 5 and 15 months after death.ResultsOf 179 deaths, 115 (64%) occurred after the WWLST decision and 64 (36%) despite maximum care. Parental satisfaction with newborn care and received support by professionals and relatives was higher in the first condition. Sixty-one percent of parents (109/179) attended the 3-month interview, with the distribution between groups very close to that of hospitalization. The completion rates of the HADS questionnaires by the parents who attended the 3-month interview were 75% (82/109) at 5 months and 65% (71/109) at 15 months. HADS scores at 5 months were consistent with anxiety in at least one parent in 73% (60/82) of cases and with depression in 50% (41/82). At 15 months, these rates were, respectively, 63% (45/71) and 28% (20/71). Risk of depression at 5 months was lower after a WWLST decision (OR 0.35 [0.14, 0.88],p= 0.02). Explicit parental agreement with the WWLST decision had an equivocal impact on the risk of anxiety at 5 months, being higher when expressed during hospitalization, but not at the 3-month interview.ConclusionsContext of death has a significant impact on the emotional experience of parents after neonatal loss, which underlines the importance of systematic follow-up conversations with bereaved parents.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12904-023-01183-8.