Is this anorexia?

I thought I was fat. I didn't eat. I wasn't hungry at all. This was all happening until my body couldn't take it anymore and started vomiting water. I then more recently thought I was fat again and stopped eating and almost passed out. What is this called ??