In fact, he collapsed from his brain tumor at the bank that he robbed in his fantasies. We see Alec die and then hear his voiceover narration wishing his friends well and saying he hopes they live rich lives and can see each other again someday.
Indeed, he fainted due to his brain tumor as he imagined robbing a bank. We witness Alec's demise and then listen to his voiceover, which includes messages of good fortune for his friends, wishing they could live full lives and see each other once more in the future.