Are you thinking about death or thinking about hurting someone or yourself? Are you more hung up on the fact that you had 1 thought about this subject matter or are you constantly thinking about it?
It's not abnormal for someone who doesn't have a mental health issue to have these thoughts if they're just related to death. It can depend on what's happening in your life, your age or someone close to you dying. Or maybe you saw a TV show or read an article about death....there are a million reasons why these thoughts are going through your head and most of them are benign.
Thoughts of death are very common among people who are depressed. They can also be associated with obsessive-compulsive disorder (and other mental illnesses). Have you spoken to your doctor about these thoughts?