He told me and I did nothing

When I was gym class one day, I noticed one of my classmates looking sadder than he usually did. We didn't speak much, other than the usual banter between classmates. I asked him what was going on and he told me that things were bad at home and he was having a shitty day. I told him to "cheer up, it could be worse" and he responded with,"No it couldn't. You have no idea. I wish I was dead."

That ended our conversation. Minutes later class was dismissed.

The next morning there is an announcement over the p.a. system. This same guy I was just talking to yesterday wa found dead in his basement overnight. He had hung himself.

I should have said something to someone.

Name kept secret
Location kept secret