Asking when one can consider someone free of mental illness is something like asking, when can you consider someone free from being a heretic and spreading heresy?
Homosexuality was once considered an official “mental illness” (as defined as being an official psychiatric disorder).
According to Thomas Szasz, the idea of mental illness is a metaphor, and the definition of mental illness is ultimately subjective since mental disorders are not actually bodily illnesses.