Mediation analyses revealed precuneus thickness mediated the relationship between chronic multisite pain and history of a suicide attempt, while the amygdala volume showed the strongest effect for a local pain site, and was specific to individuals with chronic abdominal pain.