To stop harming yourself, you will have to look for things to do all the time. Do not stay idle at all, because it can be dangerous. If the situation is very complicated, talk to your guardians or a friend. You should also consult a psychiatrist.
The best thing I do when I want to cut myself is use the edge of a marker or pen and just write on myself. Do something else that you really enjoy to take your mind off of a lot of things. Be strong. Everyone is strong on the inside to control any situation(: