I can sort of relate how you're feeling. Lately I don't feel any motivation for school whatsoever, I've just stopped caring. I also used to self harm, although it was some years ago, and not that serious. Lastly, I relate to feeling super happy one second, and then starting crying the next. It is honestly super confusing, because I want to talk with someone about it, but then I don't think there's enough to talk about, cause I feel good sometimes, and I'm worried I'm just over exaggerating when I feel bad. I did end up talking with my good friend about it though, and she told me she has been going through a hard time and has been talking to a therapy for some time now. I would recommend talking with your friends, family, or even finding a therapist, if you feel the need to. It really helped me, that someone I knew could relate to the things I felt, and i also think it helped her.
About your eating problem, I would personally say you have some sort of eating disorder, but of course I'm not a doctor, and I can't know for sure. I really recommend talking with someone about that especially, as it can be really dangerous and also affect your mental health.
All in all, you should really talk with someone you know about all the things you've written in this post. I know it's a cliché, but it's always so much harder going through something alone. As I said, I also feel the same about school, but unfortunately I haven't found a solution to it, or found out why I'm feeling this way, I'm sorry, I hope find the answers and that it all gets better. Best of luck with everything (: