The first thing to take into consideration is self harm itself is not usually the problem, it is a way for the person to deal with an underlying problem.
Self harm is a way of letting emotions out and relieving distress or tension. It can be to punish yourself, deal with numbness, stop yourself feeling like you are about to explode, stop disassociation, make flashbacks stop, express emotion. There are many reasons, and none of them should be regarded as stupid. Cutting is the most frequent form, although some people burn their skin and to widen the term you could include overworking, deliberate lack of sleep, over or under eating and many other things. Self harm in itself can be addictive, and is often seen as a way of taking control over something when you cant seem to control anything else.
If the person who self harms is a friend or family member of yours, then you should realise you will have a variety of feelings about what you do yourself. Remember- your first opinions may be wrong. How can you be sure you know everything about this person? If you are angry and think they are attention seeking, take a step back. How can you be sure of this, and is getting angry going to help. Whether or not it is attention seeking self harm is still not the best way to be noticed.
Remember that they are likely very upset and try to understand their inability to stop what they are doing. Anger at the person for being unable to stop and perhaps even because you feel helpless with what is going on is only going to reinforce their hatred of themselves, their feelings of helplessness and disgust at what they are doing. Think: if they could just stop, wouldn’t they have already?
The person is under a lot of stress, let them know you can be their to help and do not try to minimise the extent of their problems how every small they may be to you. Although though you may think “It cant be that bad” it may seem that way to them.
Try and be open in your attitude to it. It may be hard for you to understand, and you may never fully understand, but you need to try and help them feel safe and able to discuss it with you, and need to let them know that you will accept them and be there for them regardless of what they do. People who self harm tend to have low self esteem, and likely as not they know they should stop what they’re doing but can’t. They may even be repulsed by their own actions. Try not to focus constantly on their self harm but be able to talk about other things as well. Above all, listen. Remember that they may not just want to hear your opinions on what they should do constantly as likely as not they may have heard it a hundred times before, but sometimes just being able to talk to someone who will listen and not give judgement is a therapy in itself.
If the person you are trying to help is upset and in danger of self harming, encourage them not to be alone. Stay with them and try to gently calm them until the urge passes. Do not force your affections on the person, they may not want your help or to talk to you and respect that if need be. If the person trusts you some form of physical contact can be re-assuring, like holding their hand or hugging them. Many people who do self harm cannot when other people are near by.
Try to encourage the person by praising any signs of success in delaying self harming, don’t go overboard but it is a positive sign they are trying to control themselves and they should be proud. Don’t get angry at failed attempts, they are quitting something that can be addictive and it may take time. If you make them feel ashamed for not controlling themselves they may begin to withdraw from you and reinforce the feelings of little self worth and that does not help anyone.
Try your best to encourage the person to see a therapist, they may not want to at first and they may have problems trusting one but it is worth a try. Therapists do not work for everyone, but it’s the same method of being able to talk to someone and putting things into perspective so if they don’t remember to keep making yourself as available as you can be to talk. This will be a stressful time for you to as someone trying to help so remember you may want to consider getting some support of your own.