Suicide is a sad thing, are you close with his parents/family?
Let them know how important he was to you and to others and that he was special and loved, if you were. Also don't blame yourself, as suicide is brought on by depression and mental issues.
Sadly, nothing you could have done would've probably helped, as the issues underneath the act needed counseling or therapy, and being a friend was important.