?Medication question?

Does anyone know if there is a medicine that helps with the urges to self harm? And also is there a medicine out there that helps with intrusives thoughts?

There are some medications but I dont remember their names. When I was last hospitalized my room mate was taking medications to help control the urges.

Thank Alex, it's ok that you don't remember the names of the meds, at least I know there is a medicine that helps with that.