Negative thoughts has a purpose. The purpose is to make you aware of future issues. The purpose is to make you do something in the present that will avoid the issue in future.
In short, life is not possible without negative thinking. I hope so far things are clear. Now, let's understand when to negative thoughts lead to anxiety and depression.
When you don't accept the probability of a future bad outcome, you will start worrying in present. On one side, your mind keeps you reminding about the issue to make you aware/prepare/act, on the other side you are taking no action, in fact you are sad because of something which did not happen yet. Since you are not taking any action, your brain reminds the bad event repeatedly, as a result, you become depressed.
Do not give your past the power to define your future
A painful event of the past, an ongoing event or an event that is yet to happen in future.
Talk to your loved ones, share as much as you can, and if you don't have anyone to talk, talk to yourself, and if you can't even do that, talk to any God in whom you have faith.
Depression needs time to survive, if you make yourself busy enough not even to spare any second, depression would cease to exist.
Use internet and entertainment to pass any extra time.(Avoid social media).
Reserve hundred minutes each morning and spend them systematically, 20 minutes for meditation, 30 minutes for broad walk, 20 minutes exercise, 30 minutes breathing exercise(pranayama), nothing can beat this if you adopt to it.
Excellent medicines with minimal side effects are available for anxiety and depression.
All you need is to be bold enough to visit a neurologist, or a psychiatrist, if you can't get support from family, book an appointment and go by your own.
Stay in cleanliness, eliminate negative peoples from your life, wear neatly ironed clothes and accessories, don't watch any negative shows, news , and movies