What classifies am eating disorder?

Does starving yourself as a form of self harm or severe anxiety count as having an eating disorder?