"Now there were some present on that occasion who told him about the Galileans whose blood Pilate had mixed with their sacrifices. He answered them, “Do you think these Galileans were worse sinners than all the other Galileans, because they suffered these things? No, I tell you! But unless you repent, you will all perish as well! Or those eighteen who were killed when the tower in Siloam fell on them, do you think they were worse offenders than all the others who live in Jerusalem? No, I tell you! But unless you repent you will all perish as well!”
It is a fraught path to take to try and connect specific sin to specific suffering. Certainly, you can cause or exacerbate mental illness with psychedelic drugs or similar (I know one guy who basically has quite extreme episodes from his bipolar disorder, gradually coming under control now, but a lot of that was from extensive use of cannabis). But that's kind of physiological causation is very different to connecting SIN to mental illness. The most explicit statement from Jesus on the matter is - particular suffering does not stem from particular sin, but repent or you will suffer in a more ultimate fashion.
Sin does not cause mental illness - to say it does is, IMO, one of the worst kinds of superstition, and serves only to continue the stigmatisation of mental illness.