How does this quotation "When I gave I gave myself" apply to Walt Whitman?
Walt Whitman, famous for his many-sectioned poem "Song of Myself", celebrates everything about himself, and about life. He feels himself one with all people, and one with nature, and takes every aspect about his life and his person, and hails it, praising it and singing its wonders. So, when he states, "when I gave I gave myself", he is speaking of how in life, we give people things, and the gift that he has to offer is himself. He gives others of his own personality, viewpoint, life and personage. From the first lines of his self-celebrating poem, "I celebrate myself and sing myself" to his ending lines that say "You will hardly know who I am or what I mean, but I shall be good health to you nonetheless," Whitman himself considers who he is, and his life, a precious gift. So, he gives it to others. He has given Americans the gift of his poetry, which has lived through the generations, and is celebrated as some of the finest in American history. So his poetry, praising himself, has indeed become a wonderful gift.
I hope that helps. I provided links below to other commentary on Whitman himself, and his poetry, and that might be useful also.