No Buddhist comfort, I am afraid, just some thoughts from personal experience.
First of all, on the "rational" level, one has to acknowledge that the ex who killed himself, was most likely mentally ill. even though many will have felt that life without the lived one is futile, most reasonably sane people do not seriously consider or execute suicide.
This leaves the "guilt" element: guilt for maybe not having responded properly to a mental illness if it become apparent before; or guilt for breaking up and disappointing the other one's expectation in oneself.
Been there, done that (only that my ex didn't kill himself but died from a cardiac arrest).
I think the key is to forgive oneself for not being perfect, for maybe not having assessed or handled things in the relationship as good and skillful as one could have done. But it's a two-sided situation, in which the other person also had the chance,the right and the responsibility to make their own more or less skillful choices. No one can live another persons life.
Still, the regret that things might have turned out this way, might linger for a long time.
But it shouldn't become something that defines us.
Life is muddling through, we all get our hands dirty once in a while; for something like this, I appreciate the Ajahn Brahm advise to "acknowledge, forgive and learn".
With sympathy and kind thoughts to your friend