Saint Joseph is the patron of a happy death because he himself died the happiest of happy deaths. According to tradition, Saint Joseph died in Nazareth before the public life of Jesus and in the arms of Jesus and Mary. Saint Joseph knows, then, what it is to die well. We should ask him often for the greatest of graces, that of a happy, holy death.
Blessed Joseph, who didst yield up thy last breath in the arms of Jesus and Mary, obtain for me, I beseech of you, the grace of a happy death. Defend me from the attacks of my infernal enemy in that hour of pain and anguish, to which I now invite you, that you may assist me by your presence and protect me by your power; and obtain for me this grace, 0 holy Joseph, that I may breathe forth my soul in praise, saying in spirit, if I am unable to do so in words: Jesus, Mary, and Joseph, I give you my heart and my life. Amen.