If animals didn't feel sorrow, there would be no Magpies mourning or honoring a fallen member. There would have been no "Hachiko," the faithful Akita breed dog whose loyalty has been celebrated over the world in the form of stories, books, sci-fi dramas, and movies such as Futurama, turns 100 in 2023. His statue has stood at the Shibuya railway station in Tokyo since 1934 when it was first made and later redone in 1948.
Nor the case in May 2022, when "a Labrador was found lying next to the body of a 74-year-old Arizona man who had died during a hike. The month before that, a missing 29-year-old hiker was found dead in Los Angeles' Griffith Park with his dog by his side. Family members said it appeared the dog hadn't left his side for two weeks."
Nor the cat still mourning it's owner a year later as in this video (watch to the end): https://www.tiktok.com/@bigmeoow/video/7195887157528218926
And, we know elephants and apes have complex social structures. They mourn and love. So too do horses, as I can attest having been around them a lot in my youth.