My best friend died almost three years ago and I think it was my fault.
Why would you think it's your fault?
I think I caused it by not supporting him when he was depressed.
You didn't cause your friend's depression and you didn't cause their death. Depression is very serious and and while you couldn't be there all the time that doesn't mean you didn't care about him.
I know the depression made him suffer, but I hope he's feeling better now, wherever he may be.
Hoping that your friend found peace shows how much you cared about him. You can't control everything and  you shouldn't beat yourself up over his death as it wasn't something you caused.