Pollyanna hypothesis claims that human beings have a universal tendency to use positive words more frequently and broadly than negative words. The present study aims to test Pollyanna hypothesis in medical death narratives at both lexical and text levels by using sentiment analysis and emotion detection methods, and to qualitatively analyze the contextual use of emotion words to deepen the understanding of doctors' emotions. Sentiment analysis showed a strong token-based linguistic positivity and a weak type-based negativity bias at the lexical level, and a general positivity bias at the text level, despite the gender of the doctors. Emotion detection discovered three prominent emotions of “joy”, “sadness”, and “anger”, and a greater diversity of negative emotions in contrast to positive emotions in medical death narratives. Contextual analysis revealed that emotion words associated with joy were primarily observed in contexts related to doctors' actions and behaviors aiming to benefit others and promote social wellbeing. Emotion words associated with sadness and anger were chiefly employed to describe situations involving patients' death and doctors' attitudes towards death. The results confirm Pollyanna hypothesis at both token-based lexical level and text level and falsify the hypothesis at type-based lexical level. Possible explanations are explored by contextual analysis, and theoretical analysis from the perspectives of cognitive linguistics and social psychology. The findings are expected to enrich the understanding of Pollyanna hypothesis as well as the junior doctors' emotional responses to clinical deaths.