Respuesta :
The literary device that Whitman uses to address the sea in this excerpt from "Song of Myself" is apostrophe.
According to the dictionary, apostrophe, aside from being a punctuation mark, is a literary device that consists of "the addressing of a usually absent person or a usually personified thing rhetorically" (Merriam-Webster.)
In this excerpt, Whitmant is clearly personifying the sea by adressing directly to it as a person ("You sea!") and as if it could understand what he is saying to it ("I resign myself to you...")