Objective: We compare individuals with newly diagnosed HIV with sex-, age-, and socioeconomic status-matched HIV-negative controls, with the aim of studying the frequency of health care visits, the types of clinics visited, registered diagnoses, and psychopharmacotherapy. Methods: The data were collected through the Stockholm Region administrative database (Stockholm Regional Health Care Data Warehouse) for men and women (people) living with newly diagnosed HIV (PLWH) in their medical records (930 men, 450 women) and controls. The odds ratios (ORs) with 99% confidence intervals (CIs) for psychiatric comorbidities and relevant pharmacotherapies were calculated during the 2011-2018 period. Results: Substance use disorder was higher in PLWH than in controls, before and after newly diagnosed HIV in men (OR = 1 year before 4.36 [99% CI = 2.00-9.5] and OR = 1 year after 5.16 [99% CI = 2.65-10.08]) and women (OR = 1 year before 6.05 [99% CI = 1.89-19.40] and OR = 1 year after 5.24 [99% CI = 1.69-16.32]). Health care contacts and psychiatric disorders were more common in cases than controls 1 and 2 years after diagnosis, particularly for depression in men 1 year after HIV (OR = 3.14, 99% CI = 2.11-4.67), which was not found in women (1 year OR = 0.94, 99% CI = 0.50-1.77). Conclusions: Before newly diagnosed HIV, PLWH have the same level of psychiatric diagnoses as their controls, except for substance use disorder. Psychiatric problems are more common in PLWH than in their controls after newly diagnosed HIV.