While I can't say much about whether or not it does have a direct impact, I do know that a lot of psychological illnesses may have physical symptoms that in turn may cause heart attack. I know I'm likely going to get a heart attack before the age of 30, or my early twenties, because of my psychological illnesses having very physical manifestations.
On a theoretical level I do believe that physical illnesses can cause a heart attack without necessary physical manifestations of the mental illness. Psychological illnesses causing stress, stress is bad for you, stress causes side effects and yes, it could be.
This is only my opinion, however.