From A Bibliography of Alexandre Dumas père by Frank Wild Reed: In 1867 Dumas sent Madame Mathilde Shaw the ten lines of Hamlet's note to Ophelia, from his own translation (see "Vers d'Hamlet à Ophélie," on page 216), and beneath them a further six lines addressed to herself.
These six lines, entitled "À Mathilde." rhyme a, a, b, c, c, b.
They were first published in Madame Shaw's article in "La Nouvelle Revue," No. for August 1st, 1899, pp. 448 to 473, entitled "Alexandre Dumas Père : Mes Souvenirs sur lui."
When, later, she enlarged the above article, including it as part of her volume "Illustres et Inconnus," the verse appeared on p. 200. It is there dated May 22nd, 1867.
Reference :—
Shaw: "Illustres et Inconnus," Paris, Charpentier, 1906.