Until 1973, homosexuality was considered "mental illness", with diagnostic criteria in the DSM.
Then it was removed. What happened? Did it stop existing? No. Were homosexual individuals "cured"? No.
Quite simply, the psychiatric community decided that individuals with same-sex desires were not, _and never had been_ mentally ill. The illness was no more.
The same is not true of physical illness.
Different argument:
The diagnostic criteria for "mental illness" overlap. So it's possible to be diagnosed with say, ADD and "Bipolar type 2" and "generalized anxiety disorder".
Which is it? Which illness does the patient have? How does one decide? Which _physical_ mechanism is responsible for one vs the other two?
Physical illness has no such ambiguity.
Nobody knows. Because the map does not map to reality. It's like asking if a hot dog is a kind of sandwich. Maybe. Who cares. It's the wrong question.
Last example:
People suffering from grief/bereavement match many, if not all, the diagnostic criteria for "Depression". Are they depressed? Or are they merely grieving? The answer (if you're a psychiatrist) depends on which volume of the DSM you use (the latest one does not exclude bereavement from the diagnostic criteria).
Is there similar subjectivity with physical illness? No. So they are clearly categorically different kinds of diagnoses, and Thomas Szasz's argument is that for that reason we should not use the word "illness" to talk about these kinds of very real problems.