I’m sorry to hear about what you are going through. I am not capable of giving you a diagnosis, but what you describe sounds like a form of OCD. Some people with OCD get recurring thoughts and “urges” to harm themselves (or others), although they would never actually commit the actions that they see in their minds. There is psychiatric treatment available for OCD. Whether you think it is OCD or not, I do strongly suggest that you seek help from a mental health professional.