I do not believe there's evidence or reason to say that suicidal tendencies convey evolutionary advantage to the species. Many things seem to be accidents. Does the https://en.wikipedia.org/wiki/Photic_sneeze_reflex convey advantage? Very likely no; it's an accidental mutation that doesn't cause enough damage to be selected against.
Evolution isn't directed, and there is no end state. Attributing positive effect to every mutation verges on https://en.wikipedia.org/wiki/Teleology.