Upon reading what impostor syndrome is, I had the weirdest feeling.
I don't have this problem with your advice specifically, but with this type of advice on the internet in general. Everyone tells people what they should do, but there is no how they should do it. (I've had the same problem with the limited books I've read, and haven't gotten much advice from people.)
In any case, it's not very constructive advice. Telling depressed people that they shouldn't beat themselves up because it leads to failure just makes them beat themselves up for beating themselves up. IIRC, the best practice is to teach self-compassion: it's okay to be down on yourself sometimes; just let it happen and keep moving forward as best you can.