Animals can hurt themselves to save their life for example foxes and tigers falling in traps are known to chew their paws to escape from the trap. Thus one can argue that all living creatures want to live and to escape death as well as losing freedom.
looking at how animals live, an animal can always use its capabilities to escape danger or problems as well as to look for food for survival. In humans who commit suicide sometimes it is because there is no "exit". for example some people commit suicide due to being unable to pay their loans it is the feeling of distress losing all hope and the fact that it is hard to escape from problems in a human society that lead to this thinking.
so a person doing so is trying to escape the problems instead of facing them. further, the fact that humans have the concept of "responsibility" and being held accountable by members of the society all these lead to this thinking as the only escape