This is what HR is for, in this case: HR IS YOUR FRIEND
This person is suffering from an illness which is affecting his performance. Most HR departments have access to, or can direct an employee to mental health services, which this person seems to be in desperate need of. Be prepared to replace him with a temp, as he may not be able to work while he's getting treatment.
UNDERSTAND THIS This is neither your fault nor your responsibility. Do not try to "save" him. If you are not a mental health professional, you can do more harm than good. He needs to be evaluated, assessed, and treated. That is not your job.
Notify HR about any suicidal tendencies he's expressed, and be as detailed as possible. Speak to them privately first and ask for guidance, then let HR reach out to him.
In the future, it should be all hands on deck at the first mention of suicide or depression, especially with the world being the way it is now. Someone who is suicidal can be a danger, not only to themselves, but to others as well, as the thoughts can turn towards workplace violence, so this should always be taken very VERY seriously.
Get to HR right away, brief them on what's going on, and hand this guy off to them. Look into hiring a temp, because he may go out on disability for a while.