The diaries provide a rare and striking insight into the faith and mental struggles of the late pope.