Cognitive Behavioral Therapy is an effective treatment for various mental disorders including depression and anxiety. These days, you can use your smartphone to get started with it. Take Quirk for instance: it is an open source iOS app for CBT that lets you record your thoughts and challenge them. It helps you train your brain to change your negative thoughts.
This app gives you a checklist of potential ways your brain is distorting your thoughts. It gets you to consciously write down what a logical automatic thought might be. Quick is open source under the GPL. You can find out the course here.
*aff links used in some articles to fund our operations. Please look at the disclosure link to see our policy.