We all know that suicide has been totally refused in Buddhism as unwholesome act. suicide can be observed in human realm but why not in animal realm?
I'm not sure that they don't, not sure that it is never observed -- sometimes an old dog walks in front of a car for example, and is killed, and I wonder if they knew what they were doing.
But your question reminds me of a poem, by a non-Buddhist author, it's short and says:
I never saw a wild thing
sorry for itself.
A small bird will drop frozen dead from a bough
without ever having felt sorry for itself.
It's a famous poem, striking, maybe worth considering from a Buddhist perspective.
I'm not even sure about that poem, though, not sure that it's true either: its author didn't always write kindly even about people (perhaps he was wrong about animals, too) -- it's hard to be sure of others' motives.
Animals sometimes feel sad, I'm pretty sure of that, and apparently mourn their dead; but perhaps self-pity depends on the ability to tell (or fabricate) a story about oneself: which, maybe, animals don't.
suicide is a very sensitive subject. Buddha said in Channa Sutta that suicide is not always blame worthy. Only when it is done to leave current condition to find a new one is (blame worthy).
Sāriputta, if someone gives up this body and seizes another, I say it is a fault. In the bhikkhu (Channa) that fault is not apparent.
IMO Buddha did not elaborate much about suicide because people might have taken it out of context and create a cult such as the Heaven's Gate. In case of Channa Bhikku, He might have reached enlightenment during his dying process???? Sutta tells us he was making fast progress during his final hours per conversation with Ven Sariputta.
PS. Some species of mouse have been known to commit suicide for some reasons.
Physical animals appear to function on programmed instinct rather than on 'self'. For example, animals, generally, have sex for reproduction rather than for self-affirmation (therefore they do not get heartbroken & are detached in child birth) and animals, generally, do not engage in greed or random violence but are only violent when hunting for food or protecting territory.
Where as people commit suicide due to heartbreak, loneliness, financial problems, trauma from war (see 15 Common Causes Of Suicide: Why Do People Kill Themselves?), which is related to ideas of 'self', which in Buddhism is 'delusion'.
In the Pali, suttas, the term 'animal' is used for a lack of Dhamma, as follows:
Bhikkhus, from actions born of greed, hate and delusion a hellish being, an animal existence (tiracchānayoni), a ghostly sphere (pettivisayo) or some other bad state would be evident.
Now on that occasion the wanderers of other persuasions had come together in a gathering and were sitting, discussing many kinds of bestial (animal) topics, making a great noise and racket. AN 10.93
The world would have fallen into promiscuity, as with goats, sheep, chickens, pigs, dogs, and jackals. But as these two bright principles protect the world, there is discerned respect for mother… and the wives of other honored persons. AN 2.9
In the Pali suttas, the term 'human' is used for virtue & wisdom, as follows:
Bhikkhus, a god, a human or any other good state would not be evident from actions born of greed, hate and delusion. AN 6.39
Sooner, I say, would that blind turtle, coming to the surface once every hundred years, insert its neck into that yoke with a single hole than the fool who has gone once to the nether world would regain the human state. For what reason? Because here, bhikkhus, there is no conduct guided by the Dhamma, no righteous conduct, no wholesome activity, no meritorious activity. Here there prevails mutual devouring, the devouring of the weak. For what reason? Because, bhikkhus, they have not seen the Four Noble Truths. What four? The noble truth of suffering … the noble truth of the way leading to the cessation of suffering.
While some might possibly consider what I am saying as posting hurtful content on Buddhism SE, it seems quite obvious from the teachings of the Buddha that the word 'animal' in Buddhism does not refer to physical animals but to people having a mind like an animal (i.e., a mind without Dhamma). In other words, physical animals do not commit suicide but people without Dhamma, enslaved to both instinct & self-view, commit suicide.
Therefore, by practising & realising Dhamma, the inclination towards suicide may be overcome. The suttas say:
Beings (sattā) are few who that leave an animal existence (tiracchānayoniyā) & reappear (paccājāyanti) as humans (manussesu)… those beings are more numerous that reappear in hell…. For what reason? They have not realised the Four Noble Truths.
SN 56.102 to 131
In short, in Buddhism, the term 'tiracchānayoniyā' ('animal existence') refers to living without Dhamma. People in the tiracchānayoniyā realm can fall into hell, prompting suicide, or, otherwise, they can rise up into the human realms by taking refuge in the Buddha, Dhamma & Sangha.