Without exception, all totalitarian states of the 20C have used "mental illness" as a means to deprive those who oppose them of their liberty.
Mental illness is whatever anyone in authority wants it to be. Thus those who fought against communism in the USSR were diagnosed as "mentally ill". It's a very dangerous road to tread especially as mental illness is a very subjective diagnosis and without physiological symptoms to confirm. What is often diagnosed as mental illness is actually behaviorial patterns that do not conform with the norm or what is desired by the powers that be.