In general, I would say "no." It's never okay for a psychologist to deceive their patients, or to experiment on people without their knowledge. Talking to a professional about mental health issues puts a person in a vulnerable position. When a psychologist abuses that vulnerability, it is an extreme betrayal that would make it less likely for the patient to be able to open up to anyone else about their issues, thus obstructing their ability to receive mental health treatment in the future.
Performing psychological experiments on people without their knowledge could similarly aggravate underlying psychological issues, with potentially serious consequences. This is some Nazi doctor-level shit.
Mental health issues are in some ways more problematic than physical health issues, because culturally we don't take them as seriously as "real" diseases. Too often our medical system treats mental health issues as a moral inadequacy, not a health issue. The fact that we even think twice about the question posed in the OP shows how seriously messed up our priorities are.