We examined the associations between psychiatric diagnoses, substance use disorders, health services, and mortality among 9751 HIV-infected patients (>/=14 years old) in a large, private medical care program, in a retrospective cohort design over a 12-year period. All study data were extracted from computerized clinical and administrative databases. Results showed that 25.4% (n = 2472) of the 9751 study subjects had received a psychiatric diagnosis (81.1% had major depression, 17.1% had panic disorder, 14.2% had bipolar disorder, and 8.1% had anorexia/bulimia); and 25.5% (n = 2489) had been diagnosed with substance use disorder; 1180 (12.1%) patients had received both psychiatric and substance diagnoses. In comparison to patients with neither a psychiatric diagnosis nor a SU diagnosis, the highest risk of death was found among patients with dual psychiatric and substance use diagnoses who had no psychiatric treatment visits and no substance treatment (relative hazards [RH] = 4.17, 95% confidence interval [CI] = 2.35 to 7.40). Among dually diagnosed patients, receiving psychiatric and/or substance use disorder treatment somewhat reduced the risk of death compared to patients with neither diagnosis. The lowest risks of death were observed among patients with a single diagnosis who had received corresponding treatment. Our study findings suggest that screening for psychiatric and substance problems at the initiation and during the course of HIV/AIDS treatment and providing psychiatric and substance use disorder treatment may extend life for these vulnerable patients.