Self harm?

I’ve struggled with bad depression and anxiety for over a year now. My anxiety has gotten much better, but I’ve experienced suicidal ideation off-and-on since about November 2019. Last year (before the pandemic) I’d get really bad anxiety or depressive thoughts at school. Although I’ve had a lot of thoughts of self harm, I didn’t consider myself to have actually self-harmed. Some of my friends knew about it, but although they said I shouldn’t do it, they never treated it as though I was self-harming. But now I’m wondering if maybe my actions were self-harm? My nails are pretty long and the reasons why I dug my nails into my skin were usually to control my emotions and/or to punish myself (like for saying something weird, getting a problem wrong, etc). Sometimes the marks would take hours to disappear. I try really hard to not do it now, but would you consider digging my nails into my skin to be self-harm?