Sweet is the scene when virtue dies. Anna L. Barbauld, née Aikin. [Death and Burial.] Appeared in the Leisure Hour Improved, published at Ironbridge, 1809, in 5 stanzas of 4 lines, and again in The Works of Anna Laetitia Barbauld, with Memoir, 1825, p. 315, with the heading "The Death of the Virtuous."
In the American Sabbath Hymn Book, 1858, it begins, "Sweet is the scene when Christians die." On the death of Mr. Barbauld, Nov. 11, 1808, Mrs. Barbauld wrote the "Dirge," beginning "Pure Spirit! O where art thou now ". From the date of the publication of "Sweet is the scene when virtue dies" (1809), it is probable that it was the outcome of the same sad event. The popular form of this hymn is, "How blest the righteous when he dies," which appeared in Cotterill's Selection, 1819, No. 190. In the Sheffield Iris for January 13,1824, James Montgomery gave an account of the Rev. T. Cotterill's funeral, in which he says concerning "How blest the righteous when he dies” which was sung on that occasion:—
"This hymn was not the composition of the deceased, as has been mistakenly reported. It was extracted with some modifications from a longer copy of verses which appeared in the Iris many years ago, the author of which we understood to be Mr. Robert Barnard, formerly of this town, and one of the Society of Friends. The opening of the original lines being 'Sweet is the scene when virtue dies,' was altered [to "How blest, &c.,"] for an obvious reason when the stanzas were adopted for Mr. Cotterill's hymnbook. We can further say that he was peculiarly delighted with them. The following exquisite poetical stanza follows the first as they stand in the hymn-book:—
"'So fades a summer cloud away,
So sinks the gale when storms are o'er,
So gently shuts the eye of day,
So dies a wave along the shore.'"
From this extract it is evident that the alterations in the text of the poem to adapt it for congregational purposes were made by Montgomery for Cotterill. Montgomery's guess as to the authorship of the original was disproved by the publication of Mrs. Barbauld's Works in 1825 with the poem therein. This form of the hymn is in common use in all English-speaking countries.
-- John Julian, Dictionary of Hymnology (1907)