To dream that you are harming yourself suggests that you are seeking attention. You are expressing a desperate cry for help. Alternatively, you are trying to disconnect yourself from the unbearable pain you are experiencing in an aspect of your life. If you also self-harm in real life, then you are urged to seek professional help.
Dreaming of someone self-harming themselves indicates that you need to distance yourself from an unhealthy relationship.