What classifies an eating disorder?

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