You should be understanding and tell them that they mean a great deal to them. Be sure not to pressure them but be firm in saying that what they are doing isn't going to make them feel better. Be very kind, you don't want to scare them away from you. Try to spend extra time with them and do things to lift their spirits. If this continues you need to talk to an adult because it is unhealthy behavior and can lead to suicide- not to scare you.
talk to them and ask if there anything you can do to help and give them a person to talk to I would recormend them to talk to a counserler or there parents then tell them u care about them and need to make sur there ok. if the problem does not inproove u will need to tell someone. it will help. just talk to them b4 to get a better understanding of why the heck theyd be doing this and make sure there not doing it under stress b4 u tell someone. make sure not to spred the info they will be giving u because this will give then not wanted stress and the problem might just get worse.