Darkness is absence of light and similarly negative thoughts are
absence of positive thoughts. The answer to negative thoughts is to
bring positive thoughts back. Ideal mind is devils workshop and will
always think negative.
Here are the ways
1.      Think differently as taught by Adi Shankracharya. Once Menka
approached Arjuna with lust and said that she wanted to have a son
like him with him. Arjuna said that why wait for 25 years consider me
as you son from today.
2.      Think opposite as taught by Patanjali. For example if you are
having a though to steal, silently start thinking of charity
3.      Think positive as taught by Buddha. Make a list of positive action
to be done today as the first thing in the morning and concentrate on
that list. Divert your mind to the pending works. It’s a type of
behavioral therapy.