There is no definitive list of what is a mental illness or not any more than there is a definitive list of what is a physical illness or not. It is based on clinician expertise. The DSM is designed so that if you use its diagnostic criteria you would get the same results as experts in the field would get with statistical significance. In the case of the **pre-**DSM-III, you would find a diagnostic criteria for homosexuality since it was accepted by clinicians at the time to be a mental disorder. This is the primary reason I am not happy with the DSM series, but I accept that there really isn’t much of an alternative. If you consider a mental illness a disability instead of a deviation from normality, you can narrow the field somewhat (since homosexuality does not impair your behavior or cause significant distress in and of itself). But there is always going to be some point where the doctor thinks it is an illness and wants diagnostic criteria so that research can be performed and compared with that of others as well as to determine the efficacy of different types of treatment.
And yes, I understand that lobbying is an issue with the DSM-5. I find this disturbing, but I have not seen any evidence that clinical trials were affected or that the diagnoses are scientifically incorrect. I hope that the NIMH concerns are addressed and a more accurate manual is created. Nonetheless, it does not invalidate it. It makes the DSM-5 an imperfect manual that may misdiagnose or underdiagnose more people than necessary (as are all diagnosis manuals). The APA really did not take the opportunity to maximize the accuracy of the DSM-5. This means the DSM-5 isn’t a great manual. But it doesn’t mean that it is wrong or that it can’t be used for scientific research or diagnosis.
Edit: Noted that homosexuality was actually removed in a printing of the DSM-II, not DSM-III. Here is a good podcast on how it happened: