I don't know if it's possible to avoid depression, as it's different for all of us. Some people that are depressed don't appear to have a reason to, while others who you would think should be are not.
How you overcome depression is also unique to each person. I overcome my depression by writing, music, support from friends and family and just working to get through each day. I try not to dwell on what caused mine. Others need medications and therapy to overcome it. You need to figure out what works for YOU and make it work.
Exercise
Meditate
Work hard
Don't speak bad about anyone else
Eat healthy
AND ENJOY WHAT YOU LIKE DOING !
You need to know the cause of the depression in order to know how to avoid and or prevent it.
KEEP ACTIVE DONT THINK OF ANYTHING SAD GO FOR A WALK GO SHOPPING. TO KEEP YOUR MIND OF OF THE DEPRESSION
If i knew that i would be a millionaire, if you find out let me know as i would love to find that out. Sorry i can't help.
Freddie