I think it depends on the species of the pet and what kind of environment the pet grew up in. A pet that stayed most of their life in the backyard, for example, and isn't overly attached to a human... Well, such pet could probably find happiness and comfort somewhere else if their owner kills themselves.
But a pet that was raised very close to a particular human and is very attached to this human would probably suffer lots. It isn't unheard of, and there is even the term "velcro dog" for them. Such kind of pet can become depressed if their owner disappears, and even die (either from depression or from refusing to eat). I don't want my dog to go through anything like that, so I don't kill myself just yet.
However, if someone wants to kill themselves and leave their pet(s) behind, I am not in position to judge. At least try to find a place/someone to take care of the pets.