Talk about the positive alternatives which may establish hope for the future. Although you want to help, do not take full responsibility by trying to be the sole counsel. Seek out resources which can lend qualified help, even if it means breaking a confidence. Let the troubled person know you are concerned - so concerned that you are willing to arrange help beyond that which you can offer. Unbearable pain can be survived.
Help is available.
You are not alone. Try not to pay more attention to the self-injury behaviors than the healthier things that this person does. Recognize the severity of this person's distress and the inability to stop hurting him or herself. Acknowledge that the person is under a lot of stress, and that you are there if there's anything that you can do to help. Don't shame the person for failed attempts at controlling self-injury, and praise any success in delaying the act.