Walt Whitman's final 1892 version of his poem "Song of Myself," published just before his passing, is an interesting mix of both realism and spirituality. As Steven G. Kellman, editor of Masterpieces of American Literature, points out, the "I" speaking in the poem is not simply a corporeal self; it's a divine self able to interact with the entire universe and affirm the "divinity and sacredness of the entire universe, including the human body" (eNotes, "Summary"). We can see the divinity of the "I" expressed in the very first stanza since the speaker, using the universal "you," states that what he assumes, "you" also assume. The speaker further states that "every atom belonging to" the speaker "as good as belongs to you," meaning that the speaker shares every single atom of the universe because the speaker is universal. Hence, from a divine and universal standpoint, Whitman explores and praises what it is to be human--what it is to be corporeal--but he does so by seeing the human body as a mini representation of its divine creator.
Since Whitman praises what it is to be human, we can certainly see elements of realism in the poem, which is a technique aimed at portraying life as it truly is. We particularly see realism in the first stanza of section 24 when Whitman gives a description of himself as one born in Manhattan, one who is emotionally agitated, one who is sensual, and eats, drinks, and breeds:
Walt Whitman, a kosmos, of Manhattan the son,
Turbulent, fleshy, sensual, eating, drinking and breeding,
No sentimentalist, no stander above men and women or apart from them,
No more modest than immodest.
All of these descriptions are accurate, literal descriptions of what Whitman is like, so all of these descriptions are examples of realism. But more importantly, Whitman is describing himself as the universal everyman who is a part of the creator, so Whitman is also using these descriptions to apply to every man.