Objective: The present study proposes a psychological preparation program with a cognitive behavioral intervention to reduce levels of anxiety and depression in addition to modifying the coping style of patients with heart disease who will undergo a surgical intervention with cardiopulmonary bypass. Method: A quasi-experimental pre-test-posttest study was carried out with a control group. 91 patients were evaluated prior to undergoing cardiac cardiopulmonary bypass surgery, of which 16 were selected for this study, 8 participated in psychological treatment and 8 patients were selected for the control group. Instruments: Hospital Anxiety and Depression Scale and the Questionnaire for Coping with Injuries and Health Problems. Results: Differences were found in the anxiety and depression scores of the experimental group, although these results were not statistically significant. On the other hand, a significant difference was found as a treatment effect between the groups in favor of the experimental group in the greater use of the Palliative coping style (p = 0.05) and less predominance of the Emotional style (p = 0.05). Conclusion: It is essential that the psychologist specialized in behavioral cardiology develops and carries out interventions so that the patient develops cognitive, emotional and coping strategies for the management of anxiety and depression.