Yōga Sūtras
Yōga Sūtra 2.34
vitarkā hiṁsādayaḥ kr̥takāritānumōditā lōbhakrōdhamōhapūrvakā mr̥dumadhyādhimātrā duḥkhājñānānantaphalā iti pratipakṣabhāvanam।
Overthinking (illogical thinking), violence and other defects, whether done directly, performed through others, or performed through influence; under the influence of greed, anger, or delusion; whether mild, moderate, or intense; results in endless pain and ignorance. Hence counter it by opposing thoughts.