In Beyond Consolation: Death, Sexuality, and the Changing Shapes of Elegy (p. 2), Melissa F. Zeiger comments that: 

"Since classical times, elegiac poetry has been shaped or informed by the narrative of Orpheus and Eurydice. The story has served as a template--a structural paradigm, even an ominous, self-fulfilling prophecy--for elegiac production. The rich complexity of the traditional narrative, with its differing versions, diverse topics, and multiple plots, has facilitated a wide range of poetic variations. At the same time, the story’s allegorical potentiality--its expression of the powers and limitations of the poet with respect to human mortality--has been exploited by elegiac poets in every period. The status of the elegist as culture hero and communal spokesperson has often been tacitly at issue in retellings of Orpheus’s story. 

In gender-political terms, Orphean motifs include men’s fears, on the one hand, of victimization by angry, thwarting, or vengeful women and, on the other hand, of being imprisoned without release in a sphere of “female” grieving and mortality. Additionally, the complex, often fraught interplay between male homoerotic desire and heterosexual cultural norms embodied in marriage is prefigured in the Orpheus story, as is the conflict between the erotically charged impulses of the living to remain connected to the dead or aggressively disconnect themselves from them." 

The “pastoral elegy” is among the most highly respected literary traditions in poetry. In “Whitman’s ‘Lilacs; and the Tradition of Pastoral Elegy" (p. 479), Richard P. Adams describes the conventions of the pastoral elegy as Whitman used them in his poem:

". . . by my count, out of seventeen devices commonly used in pastoral elegies from Bion to [Thomas] Arnold, seven appear in ‘Lilacs.’ They are the announcement that the speaker’s friend or alter ego is dead and is to be mourned; the sympathetic mourning of nature, with the use of the so-called pathetic fallacy; the placing of flowers on the bier; a notice of the irony of nature’s revival of life in the spring, when the dead man must remain dead; the funeral procession with other mourners; the eulogy of the dead man; and the resolution of the poem in some formula of comfort or reconciliation. 

The other ten, omitted from ‘Lilacs,’ are the dramatic framework; the formula ‘Where were ye, nymphs?’; the inquiry of friends concerning the cause of the speaker’s grief; the account of when and how the man died; Echo’s lament; the dead man’s biography; the pastoral setting; the use of archaisms; the reference to Aphrodite, Urania, or Clio as the dead man’s mother or lover; and the account of the dying speech and death.”

Writing about American elegies, Richard Chase (Walt Whitman Reconsidered, p. 142) observed that:

"Elegiac feeling in American literature does not, in fact, characteristically take for its occasion the death of an individual--A Bion, an Edward King, a Keats, a Wellington. Or if it does, as in Whitman’s poem, it moves quickly away from the particularity of the occasion, and without proposing the dead person as an example of tragic crisis in the hum,an spirit or in human history. The American elegiac sensibility--in Cooper, Melville, Thoreau, Mark Twain, James, and others--is most strongly engaged by the sense of lost modes of innocence, lost possibilities of brotherhood, magnanimity, and freedom, lost sources of moral spontaneity and spiritual refreshment. The tone is of pathos, nostalgia, and despair. The emotions come to rest, if at all, in the personal virtues of forbearance and resignation--not in metaphysical, religious, or political orders of meaning."

Jerome Loving (Emily Dickinson: The Poet on the Second Story, p. 36) compares Whitman’s and Dickinson’s attitudes toward the Civil War:

“Students of Dickinson have remarked on the poet’s relatively few (extant) allusions to the war that was raging as she wrote her best poetry. The war and the poetry, however, were not mutually exclusive. Dickinson was shocked by the carnage--jolted in fact into a mental disturbance that produced in 1862 more poems, and better poems, than in any other period of the artist’s life. . . . Not more than a month before Dickinson confessed to [Thomas Wentworth] Higginson that she sang “as the Boy does by the Burying Ground” Lieutenant Stearns, the son of the president of Amherst College, was killed at the Battle of Newbern.

After the same North Carolina battle, the brother of Walt Whitman told his mother: “We have given the Secesshers another thundering thrashing, and have gained a splendid victory.” George Washington Whitman added, “I went through the fight and did not get a scratch although the balls fairly rained around me, and several of our boys were struck down close by my side.” Unlike his poet-brother, who knew that the actual horror of the war “will never be written--perhaps must not and should not be,” George went through the conflict with few scratches, emotional or otherwise. Somehow Walt Whitman of New York and Emily Dickinson of Massachusetts knew the war better than the soldiers who fought it. Whitman’s observations in Specimen Days (1882) show it. Dickinson’s comments to her cousin about Mrs. Adams’s boys show it. They both experienced its unreasonable wound.”

Shira Wolosky (Emily Dickinson: A Voice of War, pp. 38-39) describes the relationship between the inner and outer violence of the war:

“Wallace Stevens, in The Necessary Angel, describes the imagination as a ‘violence from within that protects us from a violence without.’ In Dickinson, inner violence confronted outer violence. Far from remaining detached from the civil conflagration, Dickinson internalized it. The plight of soldiers was one with which she could identify. Both she and they seemed trapped in a situation beyond their control. . . . Both she and they had to war off unforeseen attacks. . . Both she and they could suddenly be overtaken by danger. . . In short, both she and they lived in a world altogether unpredictable and terrifying, in which life hung by a thread. . . Dickinson was appalled at how the random shot could spare or destroy. Life in battle was dependent upon the accidental and contingent.”

In his important study of Whitman’s commitment to representing the body and sexuality, especially sexuality between men, Michael Moon (Disseminating Whitman, p. 219) discusses the centrality of “When Lilacs Last in the Dooryard Bloom’d”:

“In the face of the overwhelming grief and guilt he shared with many of his contemporaries over the terrible losses of the war, Whitman does not simply renounce sexuality by making melancholy and self-castrative gestures in his poetry. As psychoanalytic theory long ago made clear, melancholic and self-castrative impulses are themselves behaviors with strong erotic components, however conflicted they may be. Far from renouncing or ‘moving beyond’ sexuality in ‘When Lilacs Last in the Dooryard Bloom’d,’ Whitman relaunches a self through a poetic congeries of the defiles of signified desire through which he has launched his earlier models of the self in the earlier editions of his book. In its intertwinings of the entry of the subject into sexuality with the recognition of death,’Lilacs’ links the political and historical catastrophe of the Civil War and the assassination of Lincoln with what Whitman represents as the recapitulation of the catastrophe in the psychic career of each of his readers, of every subject who enters the culture.”