I started a physics PhD program in 2014 in a very prestigious university in my field (in US) but after going through depression and heart problems, which resulted in bad grades, I decided to withdraw from the program after taking one year leave of absence in 2016. I'll be starting a one year masters program outside US which I'm pretty sure I'll get perfect grades in and I've already published a paper during this one year LOA. I'm intending to apply for another PhD program this year and my question is whether I need to submit a transcript from my previous PhD program? How severely would my bad grades in that PhD program affect my application if both my undergrad and masters GPA are 4.0 ?
my question is whether I need to submit a transcript from my previous PhD program?
There are two ways for you to proceed.
The wrong way:
Don't submit your transcript from the failed PhD attempt. Once you get accepted somewhere, look over your shoulders for the rest of your career wondering whether you will be found out and face undesirable consequences.
The right way:
Submit all transcripts and explain in your statement of purpose or similar, very briefly, that you had some unfortunate health problems during your previous PhD attempt that are now under control, highlighting that you have moved on and since have successfully completed your current graduate studies. Never, ever worry about that past experience coming back to haunt you.
I hope it is obvious that the right way is the best way forward.
For your second question
How severely would my bad grades in that PhD program affect my application if both my undergrad and masters GPA are 4.0 ?
I'll refer you to the following related question: How does the admissions process work for Ph.D. programs in the US, particularly for weak or borderline students?