Things that helped me the most: cardio, diet. It's hard to escape biology and I don't know who said it (probably hardmaru retweet) but the brain is a motion co-processor so general movement goes a long way towards maintaining a healthy mind. It won't fix all your problems but it costs nothing other than some willpower and a trail you like in your local neighborhood.