There are many ways that you can stay out of depression,only if you can control and manage yourself or else you have to consult your doctor.
Follow a good diet, find if you are missing any important nutrient in your body.
Some tips to stay out of depression:
1. Try some depression treatments like yoga, exercise, and meditation.
2. Find someone you can really trust to speak to.
3. Sleep a lot
4. Spend time with positive people.
5. Find time to laugh with your friends or family. Laughing is best to forget everything.
Hope your friend get better soon..