Resident became upset and started pinching her arm in order to self-harm. Staff blocked her hands from arms and resident attempted to bite staff. While staff were trying to process with her, resident took her glasses off and broke off earpiece leaving a sharp piece exposed. Staff retrieved and took the piece off the unit before resident could self-harm with it. Resident then went down the hall way and started banging her head on the wall. Staff blocked this but resident continued to escalate and had to be restrained. Resident was eventually able to calm down and was able to be verbally de-escalated. Resident on self-harm precautions.