Staff reported resident became triggered by a peer self-harming. Resident asked staff to go to the bathroom and when staff checked on her a few minutes later, resident did not respond so staff entered the bathroom. Upon entry it was discovered that she was self-harming with her nails. Staff was able to verbally process and redirect. Resident placed on self-harm precautions.