Talking therapy involves talking with a professional therapist about issues that maybe affecting your mental and emotional health. They can help you figure out what maybe causing your problems and how to manage them. Finding the right therapy will depend on your problem what is available and outcomes your expecting.
If your doctor refers you to a community mental health team you should be given 3 to 12 sessions of talking therapy. Aiming to help you stop self harming. In these sessions a therapist will work with you to help you find the reasons behind self harm.
Medication is not offered for self harm. But maybe offered to help you with symptoms of other mental health conditions a person may have. Balanced with the risk of overdose