You may mean to be helpful, but think about what that can sound like like to the other person (I can't speak for the GP):
* You are so dumb that the problem ruining your life is one I can solve in five words.
* It's as easy as five words; obviously you are not trying.
It can sound worse to someone suffering from a (unfairly, ignorantly) stigmatized illness such as depression.
Also, consider that probably the other person likely has been dealing with this problem for awhile. The simplistic solution that comes to mind in 30 seconds probably is one they also considered in the first 30 seconds, and probably they are well beyond it at this point.
No one said it was easy. But, sometimes - if you're not too depressed - if you manage enough of these enough of the time (possibly with the help of a good friend nagging you) you can get enough of a feedback loop going to self-sustain and maintain a healthy living pattern long enough to sink in.
Not all depression is severe depression. Same with anxiety. In many cases people can manage it by themselves (e.g. without medication or extensive counseling).
I would like to add "don't drink any alcohol" to the list. I know that even a teatotaler can have a major depression but for me the decision to stop drinking any alcohol was THE key to make my depression much better.
It took me years to realize but drinking alcohol makes me sad and anxious for a a couple of days. The more I drink the worse the mood on the next day.
And how does that help with balancing real world problems like financial security, social expectation and self-actualisation? Your suggestions seem like distractions from reality, so perhaps you would also include hard drugs in your list?