He was just committing suicide.....
In a very hypocritical and pretentious way. Throughout his whole journey he takes Advantage of people and mooched off them and uses his depression as an excuse to do so. He put his family through such excruciating agony....his father collapsing in the street sobbing...that was gut wrenching. He was supposedly close to his sister....but left her in the dark too.
I think he knew what he was doing....but probably at the end he freaked out about the prospect of a slow, agonizing death that he had a change of heart...but also realized the torturous reality that it was too late.
It’s a pretty messed up way to go...but some part of him wanted to end it. He just didn’t count on changing his mind. Had he been better prepared(With the right maps showing where he could cross safely just half a mile away) it would have been a near death experience that would have galvanized in him the will to live Life to the fullest again...with the people most important in his life.
Instead he starved to death all alone. While the girl that liked him went to prom with some other guy, his friend got released from prison all happy and his family grieved.
Sad story all around.