I don’t think it’s something you can always tell that is on someone’s mind.
I went through a similar situation with my best friend in the whole world. Luckily his story had a better ending. He has had a very rough life and depression was always sort of there in the background, though never seemed to interfere too much. He rose through the ranks at his job, finished law school, etc. Financial and family problems were always present though. We talked a lot about it and he would always assure me that suicide was never an issue. He and I live far apart now, and he goes through times where he won’t answer his phone or contact anyone for months. So, I didn’t think of it when this happened last fall. I saw him in July and not again until Christmas. I got maybe one phone call between. But I kept sending him holiday cards and notes in the mail to let him know that I missed him and loved him (upon the advice of Fluther, actually) because I was concerned. Then, at Christmas, he told me that he tried to commit suicide and took a whole bunch of pills but got scared and went to the hospital. He’s getting help now. He sees a therapist and is on medication. Still I’m terrified now if I don’t hear from him. It has just changed my world to know that he would ever…
Anyway, I guess there really isn’t anything you can do to prevent it, especially if suicide doesn’t appear imminent at the time. It can come, seemingly to outsiders, out of nowhere. If the person hides what he/she is really going through, then you can’t be held responsible even though you may feel it.