Is it possible that having a heart condition can cause you to have a lack of energy and depression?

Definitely. There is a know connection between cardiac difficulties, especially heart attacks, and depression. Also, decreased cardiac functioning can definitely affect stamina and level of energy.
Possibly. Lack of energy is very broad. Depression itself might interfere with the heart disease management. It is important that you address it with your cardiologist and someone who specializes in health psychology. Health psychologist might help you work through emotional underpinnings of the disease and disease management. Important to keep with your medication regimen and medical appointment.