1 Corinthians 15:46
Or have you lost a child? You have not lost it; say not so. This thing is sleep, not death; removal, not destruction; a journeying from the worse unto the better. Do not then provoke God to anger; but propitiate Him. For if you bear it nobly, there will thence accrue some relief both to the departed and to yourself; but if the contrary, thou dost the more kindle God's anger. For if when a servant was chastised by his master, you stood by and complain, you would the more exasperate the master against yourself. Do not then so; but give thanks, that hereby also this cloud of sadness may be scattered from you. Say with that blessed one, “the Lord gave, and the Lord has taken away.” Consider how many more well-pleasing in His sight have never received children at all, nor been called fathers. “Nor would I wish to have been so,” say you, “for surely it were better not to have had experience than after having tasted the pleasure to fall from it.” Nay, I beseech you, say not so, provoke not thus also the Lord to wrath: but for what you have received, give Him thanks; and for what you have not to the end, give Him glory. Job said not that which you say unthankfully, “it were better not to have received,” but both for the one he gave thanks, saying, “The Lord gave;” and for the other he blessed God, saying, “The Lord has taken away, blessed be the name of the Lord for ever.” And his wife he thus silenced, justifying himself against her, and uttering those admirable words, “Have we received good at the hand of the Lord, and shall we not receive evil?” And yet after this a fiercer temptation befell him: yet was he not even thus unnerved, but in like manner bore it nobly and glorified God.
This also do thou, and consider with yourself that man has not taken him, but God who made him, who more than yourself cares for him and knows what is good for him: who is no enemy nor lier-in-wait. See how many, living, have made life intolerable to their parents. “But do you not see the right-hearted ones?” say you. I see these too, but even these are not so safe as your child is. For though they are now approved, yet it is uncertain what their end will be; but for him you have no longer any fear, nor do you tremble lest anything should happen to him or he experience any change.
These things also do thou consider respecting a good wife and guardian of your house, and for all things give thanks unto God. And even if you shall lose a wife, give thanks. Perhaps God's will is to lead you to continence, He calls you to a nobler field of conflict, He was pleased to set you free from this bond. If we thus command ourselves, we shall both gain the joy of this life and obtain the crowns which are to come, etc. etc.
Source: Homilies on First Corinthians (New Advent)