Weird thought

I sometimes have this thought and it randomly comes in my head where i say my name and that i’m going to die, i’m not feeling suicidal or anything. When i used to beat myself for overeating and i did thought downloads i did used to think i hate myself and i wish i was dead cause my life sucked but i stopped beating myself up now and i don’t have these thoughts so i’m not sure about. If i put it in the model, i feel sad and confused as to why im thinking this thought, is it just an error?