Where does the halacha stand on these issues? I once came across a booklet written on this topic based on the rulings of gedolei yisrael [such as Rav Shach] and they said that one must make sure that he is emotionally healthy FIRST and only then must he be careful in his shmiras hamitzvos [mitzvos aseh].
HaGaon Rav Asher Weiss who is [rightfully] about the most popular maggid shiur alive, wrote a teshuva in the Minchas Asher [2/134] where he echoes this approach. He was asked about a talmid chachom who endlessly repeated the words of tfilla until he got it right. The doctor said that in order to heal he must say the word once and once only - even if he got it wrong.
Rav Asher Shlita supports the doctors approach from a halachic standpoint and says that just as one need not keep a mitzva if it means that he will become physically ill, he may also refrain from doing a mitzva properly if it will cause the perpetuation of a mental illness.
Here is the original.
Lesson: Make sure you are emotionally healthy before worrying about whether you are a good enough Jew. We need tzadikim - but normal tzadikim. Mori Vi-rabi Shlita calls Rav Shlomo Zalman Auerbach "זנ"ל" zecher normali livracha, because he was such a normal person.
לזכות הכותב שיזכה לפרנסה בשפע ובנקל