ABSTRACT Context. Gastric and oesophageal cancers are common. They are also expected to increase in incidence in the next few years and are characterized by poor prognosis. Surprisingly, whereas the incidence of severe anxiety and depression is high in patients with gastric and oesophageal cancers, the influence of symptoms of depression and anxiety on postoperative complications has barely been explored. Methods. In a retrospective study based on a prospectively collected database, 629 cancer patients were enrolled. Symptoms of depression and anxiety (Hospital Anxiety and Depression Scale scores) and sociodemographic and medical information were collected immediately after diagnosis and before any treatment. The surgical approach (i.e. gastrectomy or oesophagectomy) and postoperative complications according to the Clavien–Dindo classification were collected after surgery. Results. After controlling for known medical predictors (i.e. surgical strategy, alcohol and tobacco consumption, American Society of Anaesthesiologists classification physical status score) of postoperative complications, no effect of symptoms of depression or anxiety was detected. Discussion. The observed results are surprising given the literature. However, several potential arguments can be put forwards regarding methods and measures, controlling variables, and conceptual distinctions. Despite the absence of significant results, this topic should be more deeply investigated by applying methodological and conceptual adjustments.