PurposeTo compare patients with and without a history of mental illness on process and outcome measures in relation to prehospital and emergency surgical care for patients with perforated ulcer.MethodsA nationwide registry-based cohort study of patients undergoing emergency surgery for perforated ulcer. We used data from the Danish Prehospital Database 2016–2017 and the Danish Emergency Surgery Registry 2004–2018 combined with data from other Danish databases. Patients were categorized according to severity of mental health history.ResultsWe identified 4.767 patients undergoing emergency surgery for perforated ulcer. Among patients calling the EMS with no history of mental illness, 51% were identified with abdominal pain when calling the EMS compared to 31% and 25% among patients with a history of moderate and major mental illness, respectively. Median time from hospital arrival to surgery was 6.0 h (IQR: 3.6;10.7). Adjusting for age, sex and comorbidity, patients with a history of major mental illness underwent surgery 46 min (95% CI: 4;88) later compared to patients with no history of mental illness. Median number of days-alive-and-out-of-hospital at 90-day follow-up was 67 days (IQR: 0;83). Adjusting for age, sex and comorbidity, patients with a history of major mental illness had 9 days (95% CI: 4;14) less alive and out-of-hospital at 90-day follow-up.ConclusionOne-third of the population had a history of mental illness or vulnerability. Patients with a history of major mental illness were less likely to be identified with abdominal pain if calling the EMS prior to arrival. They had longer delays from hospital arrival to surgery and higher mortality.