Imagination enabled Pi to take what was an awful tragedy, a horrific experience, and a living nightmare, and turn it into an endearing tale of survival, friendship, and endurance. The harsh reality that Pi had to deal with--the brutal, violent loss of his mother, having to surive with a cannibalistic mad-man on a raft, and then fight to the death for his own survival--was just too much to endure. Any person faced with such brutality and trying circumstances would want to escape, would want to deny reality, and find a coping mechanism that would allow them to survive with the least amount of damage possible.
Pi's imagination saves him. He takes the situation, and converts it into a tale that is amazing and fascinating. In the creation of Richard Parker, he is able to be okay with the fact that he had to violate many of his beliefs and morals in order to survive. Pi doing those things was unthinkable; Richard Parker doing them was understandable and expected. He created a reality where it was okay to be what he was as he struggled to survive.
In addition to his imagination creating a reality that allowed him to survive, his faith helped him to create that alternate reality. He was prone to believing great stories, based on faith, and that helped him to believe his own. He also prayed every day on the raft, had a firm grasp of what forgiveness meant, and didn't feel alone because of his faith. It enabled him to make it through his ordeals without feeling totally alone and desolate.
I hope that those thoughts helped; good luck!