These lines have been taken from Samuel Butler’s novel Erewhon Revisited (1901). Here’s the context:
My father has said that the Erewhonians never put up monuments or write epitaphs for their dead, and this he believed to be still true; but it was not so always, and on waking his eye was caught by a monument of great beauty, which bore a date of about 1550 of our era. It was to an old lady, who must have been very loveable if the sweet smiling face of her recumbent figure was as faithful to the original as its strongly marked individuality suggested. I need not give the earlier part of her epitaph, which was conventional enough, but my father was so struck with the concluding lines, that he copied them into the note-book which he always carried in his pocket. They ran:—
I fall asleep in the full and certain hope
That my slumber shall not be broken;
And that though I be all-forgetting,
Yet shall I not be all-forgotten,
But continue that life in the thoughts and deeds
Of those I loved,
Into which, while the power to strive was yet vouchsafed me,
I fondly strove to enter.
My father deplored his inability to do justice to the subtle tenderness of the original, but the above was the nearest he could get to it.
Samuel Butler (1901). Erewhon Revisted Twenty Years Later, Both by the Original Discoverer of the Country and by His Son, pp. 119–120. London: Grant Richards.
Butler’s two Erewhon novels are satires of Victorian society, in which English conventions and mores are interrogated through the imaginary country of Erewhon, where everything is backwards. For example, in Erewhon the social roles of disease and criminality are transposed:
if a man falls into ill health, or catches any disorder, or fails bodily in any way before he is seventy years old, he is tried before a jury of his countrymen, and if convicted is held up to public scorn and sentenced more or less severely as the case may be. […] But if a man forges a cheque, or sets his house on fire, or robs with violence from the person, or does any other such things as are criminal in our own country, he is either taken to a hospital and most carefully tended at the public expense, or if he is in good circumstances, he lets it be known to all his friends that he is suffering from a severe fit of immorality, just as we do when we are ill, and they come and visit him with great solicitude
Samuel Butler (1872). Erewhon or Over the Range, p. 84. London: Trübner.
The lines from the question are another example of this kind of satirical reversal. Many English epitaphs alluded to the deceased’s hope of eternal life according to their Christian faith. Here are a couple of examples employing Butler’s phrase “full and certain hope”:
And, when the grim monarch levelled his dart at him, he met the stroke with fortitude, and left this world in full and certain hope of a better.
John Nichols (1812). Literary Anecdotes of the Eighteenth Century, volume II, p. 421. London: Nichols, Son & Bentley.
The event accelerated at least his own death, which occurred soon after; and the mortal remains of thes three honoured vestiges of departed worth, now have blended their dust, and repose in the full and certain hope of a joyful resurrection.
Joseph Cottle (1829). Malvern Hills: With Minor Poems and Essays, volume II, p. 371. London: T. Cadell.
However, the people of Erewhon do not believe in life after death, and so instead of heaven or resurrection, they have a “full and certain hope” that they will remain dead for ever (“slumber shall not be broken”) and all that will survive of them are the memories of the people who knew them. The collapse of religious belief since Butler wrote his novels means that for most modern readers, this sentiment no longer strikes us as a satirical reversal, but as the plain truth of the matter.