Please see a professional ASAP, then follow-up with all of your service providers.
I average about 2 crisis safety screenings a week.
Self-harm is a sum total of coping not being able to counter-balance stress.
There is never one attributable cause.
I have very rarely seen switching a medication as an adequate answer.
When I have seen medication changes as a result of concerns of self-harm or actual attempts, it is one of numerous items on an action plan.