1,301. Mitigating Factors
201:3 If a child committed suicide, he is considered as having done so without understanding. Similarly, if it seems that an adult did so because of conditions like depression or mental illness, he is considered as having acted without understanding. The same is true if one committed suicide under duress, such as to avoid being tortured as King Saul did because he was afraid of what the Philistines would do to him (in I Samuel chapter 31). All of these are treated like any other deceased person and we don't tell the relatives to refrain from any mourning practices.
201:4 Aninus and aveilus (forms of mourning) are not observed for those who left the community, throwing off their religious obligations and not considering themselves part of the Jewish people, nor are they observed for apostates, informers and heretics. [This halacha does not account for mitigating circumstances; consult your rabbi for matters of practical application.]