If Trevor finally goes to the police at the end of The Machinist to say that he did the accident and he goes to sleep in a jail cell, why does he drive again into a tunnel after a second?
First of all, the final scene showing Trevor Reznik (Christian Bale) driving down the road is a flashback. It is most likely something that occurred moments after the hit and run. This is evident from the fact that the windshield of Trevor's car is still cracked. Trevor himself looks pretty healthy at this point.
I went over the last few seconds of this scene a few times and I noticed that Trevor's expressions change in a very interesting way. The scene is probably intended to represent the transformation of Trevor Reznik. The scene starts out with Trevor looking extremely distressed. You can see the regret on his face and how he wishes that he could take everything back. Clearly this accident is something that he couldn't handle. He couldn't handle the fact that because of him, a mother lost her child. He feels devastated by the fact that his negligence cost the life of someone. This is probably when he realizes that his actions are going the wreck himself. He realizes that he can't go on knowing that he is responsible for the death of an innocent child and that the only way to cope from this incident is to forget it in its entirety. The scene ends with Trevor looking like he has decided to deceive himself into believing that nothing ever happened. The trauma made him block out his memories of the incident. The Trevor that drives out the tunnel into the sunlight is completely different from the one that we see going in.