Patients diagnosed with coronary heart disease should follow lifestyle recommendations that can reduce their cardiovascular risk (e.g., avoid smoking). However, some patients fail to follow these recommendations and engage in unhealthy behavior. With the aim to identify psychosocial factors that characterize patients at high risk of repeated cardiovascular events, we investigated the relationship between social support, mental health (coping, self-esteem, and perceived stress), and unhealthy behavior. We conducted a cross-sectional study of 419 patients recently diagnosed with coronary heart disease (myocardial infarction or angina) who participated in the National Health Survey in Spain (2018). Unhealthy behaviors were defined according to the European Guidelines on cardiovascular disease prevention. Only 1% of patients reported no unhealthy behaviors, with 11% reporting one, 40% two, 35% three, and 13% four or more unhealthy behaviors. In multiple regression controlling for demographic and traditional risk factors, mental health was the only significant psychosocial factor, doubling the odds of accumulated unhealthy behaviors, OR(high vs. low) = 2.03, 95% CI [1.14, 3.64]. Mental health was especially strongly related to unhealthy behavior among patients with obesity, OR(high vs. low) = 3.50, 95% CI [1.49, 8.45]. The relationship between mental health and unhealthy behaviors suggests that a large proportion of patients may not adhere to lifestyle recommendations not because they purposefully choose to do so, but because they lack coping skills to maintain the recommended healthy behaviors. Low mental well-being may be especially detrimental for behavior change of patients with obesity.