Here's what one of our general authorities says.
Although it is wrong to take one’s own life, a person who commits suicide may not be responsible for his or her acts. Elder M. Russell Ballard of the Quorum of the Twelve Apostles has said: “Obviously, we do not know the full circumstances surrounding every suicide
There is a wonderful article by him on lds.org under Suicide.