They could be a result of your mental illness. Schizophrenia is a thought disorder. Disorganized thinking and illogical thoughts are part of the disorder. They can also be brought on by stress.
There are also cases of people who have intrusive, negative thoughts. They become fixated on these thoughts and begin to worry that these thoughts make them a “bad” person. The more fixated they become on the thoughts, the harder it becomes to get rid of them. Those symptoms are indicative of obsessive-compulsive disorder. Obsessive-compulsive disorder is an anxiety disorder. Perhaps there is some anxiety-based reason for your unwanted thoughts.
They could also be the result of your medication. Psychiatric medications can be quite powerful and may produce nightmares.
I would recommend discussing this with a therapist. There’s nothing to be ashamed of because you have done nothing wrong. When it comes to dreams and fantasies, you can’t control them. They happen to us. Often they are simply expressions of emotion. They are not to be taken literally.
Once you address your concerns in treatment, they may disappear entirely from your consciousness. Please take care.
Dr. Kristina Randle