Hello dear user. Negative thinking process or pessimism can be seen in many psychiatric disorders. Intrusive unwanted thoughts are generally seen in OCD. It could be a rumination also.
Next Steps
Consult a psychiatrist for a detailed mental health assessment to rule out any psychiatric disorder.
Health Tips
Relaxation exercises and distraction will help