Definition of mental illness is relying on whether a condition conflicts with society. Therefore, as a function of 19th century western society, it was a mental illness; thankfully, now it is not.
Without a context of environment a definition of mental illness can not possibly exist. For example, paranoid schizoprenia wouldn't be a mental illness in an environment where all paranoid fantasies turned out to be true.