The issue of mental health has gained heightened recognition as a significant public health concern due to its potential to significantly impact various aspects of individuals’ lives. Numerous factors may influence mental health, and this study seeks to investigate and compare potential healthcare-related factors that affect the mental health of Taiwanese individuals across different age groups. Data for this study were taken from the Taiwan Social Change Survey (TSCS), conducted in 2021. Descriptive statistics were calculated to compare the three age groups. Then, multiple regression models were constructed with mental health conditions as the dependent variable and demographics and other key healthcare-related components as independent variables, respectively. Results showed that, among the three age groups, the middle-aged adults had the highest BMI, and the older adults had significantly better mental health. As compared with the other age groups, the older adults had significantly better perceptions of fair distribution of healthcare resources, and their trust in the healthcare system was the highest. With regard to searching for online healthcare information, the frequency reported by the older adults was the lowest. The regression model showed that, religious belief, trust in the healthcare system and searching for online healthcare information were significantly associated with mental health of middle-aged adults. In the younger group, searching for online healthcare information was significantly negatively associated with mental health. The study’s findings provide insight into how to provide Taiwanese citizens of different age groups with proper and targeted mental health promotion activities.