While i do agree that people also start off by instinctively acting/thinking in the most beneficial way for them (in their own view), humans can (and everyone does, to a degree) alter that balance with thoughts, and even arrive at the opposite order, leading in the end up to suicide attempts. Animals do not commit suicide (as far as i know there isn't any animal that does), so it has to be supposed they are not able to willingly alter their behavior in a self-harming manner.
That said, some animals (such as dogs) obviously can be traumatised and then diminish their ways, but it does not seem at all to be a decision on their part, it is just the overwhelming impression that they are in a hopeless position. So even a stray dog in miserable shape will keep on crawling on the streets, and never will try to end its own life.
In the case of humans, while the onset often is again their impression that their position is impossible to make anything good of, they proceed to actively be more self-destructive, or even utterly suicidal. This shows that they have the ability to erode the logic in regards to self-preservation, and to fight their own body along the way.