As far as I know, mentally ill people will not be held accountable for anything they do simply because they do not have the mental capabilities to part right from wrong. Just like a child.
In that case, how will they be judged ? If they will go directly to the heaven, then isn't that unfair for rest of us ?
Note that I am not saying their lives are meaningless or anything. They can be a test for the society, parents etc.