The more I think about this comment, the more it just seems so wrong. Yes, depression is not always caused by lifestyle, but it definitely can be.
What you are saying just sounds like an excuse for taking the easy path.
If trying to change your lifestyle to fix your mental health is a bad thing, what is your counter suggestion? Taking pills that make you addicted, not solve the problem and make everything worse if you stop taking them?
I know there are cases, where medication is inevitable and is the only option. But this is a minority. The vast majority of mental health issues we have today, are caused by lack of virtue and values, choice of diet, sleep and lack of social interactions.