I'm definitely not an animal biologist or zoologist but if you look at certain animal behaviour, it does mimic human behaviour for sure.
A lot of animals will euthanize weak or deformed offspring. Whether or not it's because the care for them will slow down the herd or make them more vulnerable to attack or simply just to put it out of its misery (because it's the right thing to do or the parent/leader can't stand to see it suffer), we don't know why animals choose to do this.
Also, look at the number of animals that simply go off on their own to die. Maybe they're already terminal, maybe not, but the fact is, lots of animals will separate themselves from a herd or even humans to go off and die on their own. Is it suicide or just out of respect, I also don't know this.
Lots of marine wildlife will beach themselves as well (whales, dolphins, larger creatures in general), maybe it's also suicide, who knows?
I don't think suicide is genetically a human trait, I believe animals also have the ability to know when to call it quits too. I think we would vastly underestimate the intelligence of animals if we didn't think they felt sorrow, despair, sadness, grief and even suicidal ideations too.
When my cat was really sick, in his final weeks, I let him outside one night because he was pawing around the door that led to the backyard. After I let him out, about 5 minutes later, I suddenly thought about him just leaving and going off to die on his own, since there were a lot of areas to do it (small pockets of forests). I called him, but he never came back, and I couldn't sleep at all. I went looking for him, but I couldn't find him. Then, after 2 am, I heard his faint meow, and I jumped up out of bed and he came back. Honestly, I thought I had lost him for good and knowing him, he was the type of cat that would've spared me the event of watching him pass away too. He passed away a few weeks later one morning, gently, with me holding him. I don't know if he ever thought about wandering off and ending it for himself (like starving to death or getting attacked by another animal) but I'm very honoured he let me take care of him until the end.