BackgroundExcept for overall survival, whether or not waiting time for treatment could influences other domains of cancer patients’ overall well-being is to a large extent unknown. Therefore, we performed this study to determine the effect of waiting time for cancer treatment on the mental health of patients with esophageal or gastric cancer.MethodsBased on the Swedish National Quality Register for Esophageal and Gastric Cancers (NREV), we followed 7,080 patients diagnosed 2006–2012 from the time of treatment decision. Waiting time for treatment was defined as the interval between diagnosis and treatment decision, and was classified into quartiles. Mental disorders were identified by either clinical diagnosis through hospital visit or prescription of psychiatric medications. For patients without any mental disorder before treatment, the association between waiting time and subsequent onset of mental disorders was assessed by hazard ratios (HRs) with 95% confidence interval (CI), derived from multivariable-adjusted Cox model. For patients with a preexisting mental disorder, we compared the rate of psychiatric care by different waiting times, allowing for repeated events.ResultsAmong 4,120 patients without any preexisting mental disorder, lower risk of new onset mental disorders was noted for patients with longer waiting times, i.e. 18–29 days (HR 0.86; 95% CI 0.74-1.00) and 30–60 days (HR 0.79; 95% CI 0.67-0.93) as compared with 9–17 days. Among 2,312 patients with preexisting mental disorders, longer waiting time was associated with more frequent psychiatric hospital care during the first year after treatment (37.5% higher rate per quartile increase in waiting time; p for trend = 0.0002). However, no such association was observed beyond one year nor for the prescription of psychiatric medications.ConclusionsThese data suggest that waiting time to treatment for esophageal or gastric cancer may have different mental health consequences for patients depending on their past psychiatric vulnerabilities. Our study sheds further light on the complexity of waiting time management, and calls for a comprehensive strategy that takes into account different domains of patient well-being in addition to the overall survival.Electronic supplementary materialThe online version of this article (doi:10.1186/s12885-016-3013-7) contains supplementary material, which is available to authorized users.