is this self harming?

I thought self harming was when you cut yourself, but when I told my friend that I starve myself because I think I deserve it when certain things happen, she tells me that it's another form of self harming. Is that true? That punching yourself, starving yourself, or any other way of harming yourselves that don't involve cutting, is also self harm? If it is, can someone please help me so I can get help