Distraction and disappointments both are detrimental and leads to depression which ultimately gives rise to suicidal thoughts. So, in order to keep distance from depression, firstly, learn from your failures rather than getting disappointed. Secondly, stay away from all the things which makes you distracted whether it is anything and last but not least is that try to ignore the people who can't tolerate your success...
-