I think part of it was his paranoia of the whole situation, not sure if he was imagining things or not, or what was happening.
Is he dead at the end, or just pleasantly stupid now? Does he know he's stupid, and know that he used to know lots?
he not dead, he just damaged a part of his brain that involves math.
That end scene was all in his head. It didn't really happen. Obviously a drill to the brain will have more than mild conseqences. The movie was about a guy dealing with with his mental self, not his physical self, as some of you may have interpreted the movie.