You need to help him get help. You are not a professional or a miracle worker, but you are his friend. Sometimes we get so lost and down, we don't know how to find a way out. Be the person who helps and takes it seriously instead of letting your fear or doubt get in the way. The worst thing you can do is nothing.
Encourage him to talk to someone about what he's going through. School counselor, doctor, parent, whatever. 1-800-SUICIDE is a 24 hour hotline he can call and just talk to someone.
If he won't tell someone, please, do it yourself. Suicidal talk and actions are never a joke.