Very sorry to hear about your friend. If someone wants to kill themselves, they unfortunately will. It sounds like he had been planning this for a while. Sometimes, a person with depression will show an elevation in their mood. Usually, this is a positive sign. However, it can also signify relief once they have decided on suicide. I bet his recent concussion is not coincidental. Also, alcohol is disinhibiting and really raises suicide risk.
He knew what he was doing, and there is no way you could have intervened. I've been dealing with mental health patients for 30 years, and most of us have had to deal with suicide. We ask ourselves the same questions you did, and it's hard not to feel some personal responsibility. But, the reality is, suicide is not always preventable.
It is not necessarily a selfish act. It's an act of pain, desperation, and hopelessness that things will get better.