"Out of the jaws of death"
From Shakespeare's Twelfth Night.
The idea of the grave swallowing men in death is from the Bible.
Numbers 16:29-34
If these men die the common death of all men, or if they be visited after the visitation of all men; then the Lord hath not sent me. [30] But if the Lord make a new thing, and the earth open her mouth, and swallow them up, with all that appertain unto them, and they go down quick into the pit; then ye shall understand that these men have provoked the Lord.
[31] And it came to pass, as he had made an end of speaking all these words, that the ground clave asunder that was under them: [32] And the earth opened her mouth, and swallowed them up, and their houses, and all the men that appertained unto Korah, and all their goods. [33] They, and all that appertained to them, went down alive into the pit, and the earth closed upon them: and they perished from among the congregation. [34] And all Israel that were round about them fled at the cry of them: for they said, Lest the earth swallow us up also.
Proverbs 1:12
Let us swallow them up alive as the grave; and whole, as those that go down into the pit:
Isaiah 25:8
He will swallow up death in victory; and the Lord God will wipe away tears from off all faces; and the rebuke of his people shall he take away from off all the earth: for the Lord hath spoken it.