Background: Psychosocial distress among patients with limited life expectancy influences treatment decisions, treatment adherence, and physical health. Veterans may be at elevated risk of psychosocial distress at the end of life, and understanding their mental healthcare needs may help identify hospitalized patients to whom psychiatric services should be targeted. Objective: To examine mental illness prevalence and mental health treatment rates among a national sample of hospitalized veterans with serious physical illnesses. Design, Subjects, and Measurements: This was a retrospective study of 11,286 veterans hospitalized in a Veterans Health Administration acute care facility in fiscal year 2011 with diagnoses of advanced cancer, congestive heart failure, chronic obstructive pulmonary disease, and/or advanced HIV/AIDS. Prevalent and incident mental illness diagnoses during and before hospitalization and rates of psychotherapy and psychotropic use among patients with incident depression and anxiety were measured. Results: At least one-quarter of the patients in our sample had a mental illness or substance use disorder. The most common diagnoses at hospitalization were depression (11.4%), followed by alcohol abuse or dependence (5.5%), and post-traumatic stress disorder (4.9%). Of the 831 patients with incident past-year depression and 258 with incident past-year anxiety, nearly two-thirds received at least some psychotherapy or guideline-concordant medication within 90 days of diagnosis. Of 191 patients with incident depression and 47 with incident anxiety at time of hospitalization, fewer than half received mental healthcare before discharge. Conclusions: Many veterans hospitalized with serious physical illnesses have comorbid mental illnesses and may benefit from depression and anxiety treatment.