In the end, Andy decides there's no point in living any more and kills himself. It's a rough ending, especially since we root for him and want him to survive. At the same time, though, it's an ending we totally see coming as we watch Andy lose hope and convince himself that he's all alone in the world.
Remember when Andy looks at the crash site and almost jumps off the road to the cars below? The only thing stopping him is Keisha—she pulls him back and tells him not to do it. Another time, Andy talks about killing himself in therapy and his psychologist gets him to open up a bit, assuring Andy that he's there for him, day or night.
So when Andy reaches out for help and can't reach Keisha and his therapist (as well as his coach), we understand that his suicide-prevention support isn't available. And because of this, we get the sense that he's going to kill himself.
Adding to the bummer, of course, is how, well, bummed everyone is after Andy dies. His friends are confused; his parents split up; and Keisha is angry. It turns out a whole lot of people cared about Andy, so he doesn't just end his life—he changes theirs for the worse as well.