Understanding the genetic basis of porcine mental health (PMH)-related traits in intensive pig farming systems may promote genetic improvement animal welfare enhancement. However, investigations on this topic have been limited to a retrospective focus, and phenotypes have been difficult to elucidate due to an unknown genetic basis. Intensively farmed pigs, such as those of the Duroc, Landrace, and Yorkshire breeds, have undergone prolonged selection pressure in intensive farming systems. This has potentially subjected genes related to mental health in these pigs to positive selection. To identify genes undergoing positive selection under intensive farming conditions, we employed multiple selection signature detection approaches. Specifically, we integrated disease gene annotations from three human gene–disease association databases (Disease, DisGeNET, and MalaCards) to pinpoint genes potentially associated with pig mental health, revealing a total of 254 candidate genes related to PMH. In-depth functional analyses revealed that candidate PMH genes were significantly overrepresented in signaling-related pathways (e.g., the dopaminergic synapse, neuroactive ligand‒receptor interaction, and calcium signaling pathways) or Gene Ontology terms (e.g., dendritic tree and synapse). These candidate PMH genes were expressed at high levels in the porcine brain regions such as the hippocampus, amygdala, and hypothalamus, and the cell type in which they were significantly enriched was neurons in the hippocampus. Moreover, they potentially affect pork meat quality traits. Our findings make a significant contribution to elucidating the genetic basis of PMH, facilitating genetic improvements for the welfare of pigs and establishing pigs as valuable animal models for gaining insights into human psychiatric disorders.