This source is not covered by the APA Style manual. You should also check with your lecturer when using these suggestions.
You should cite the poem with the name of the poet and the publication date of the source you are using.
Example:
"O, my America, my Newfoundland" (Donne, 2003, p.14)
Hardy (1930) experiments with...
If you wish to include a line reference you can add (line xx) or (lines xx -yy) at an appropriate point in your text.
Example:
As Donne (2003, p. 11) argues "Love, all alike, no season knows nor clime Nor hours, days, months which are the rags of time" (lines 9-10).
There are three ways to reference a poem in APA.
A single author collection of poetry
These should be treated like a single author book.
Example:
Pope, A. (1963). The poems of Alexander Pope. (J. Butt, Ed.). Methuen.
Hardy, T. (1930). The collected poems of Thomas Hardy (4th ed.). Macmillan.
An Anthology of Poetry
These should be treated as a work within an anthology
Example:
Wordsworth, W., & Coleridge, S. T. (1798). Lyrical ballads. In D. Wu (Ed.), Romanticism: An anthology (pp. 333-415). Cambridge University Press.
Online
Example:
Donne, J. (2003). To his mistress going to bed. http://www.luminarium.org/sevenlit/donne/elegy20.htm