Of course they are. There's a reason why animals do or don't do a whole host of things. The reason is because they've learned that doing/not doing them leads to being dead. There are animals who mourn their dead, and some animals mourn the dead of other species. Elephants are especially notable for this, and when Koko the Gorilla was told of Robin Williams' death, she mourned him (the two had bonded as friends in an earlier encounter).