mental illness is a common side effect of being queer.
I would imagine being queer could be a side effect of mental illness.
I think it might be the other way around.