You are probably not best placed to decide whether or not you have a diagnosable mental illness, to be fair... Regardless of formal diagnosis though, you clearly have a problem and unfortunately effectively dealing with that problem would involve having to accept gaining weight.
Good luck with things and I hope you find the help and support you need.