Depressed people are not perfectly rational agents. By the time you are contemplating suicide, it's not even close.
And depression is a factor in almost every suicide.
Depression is insidious because it makes all the alternatives to suicide seem much more difficult than they actually are.