Is it necessary to read the whole poem "Song of Myself" to have an idea about it, or are there some main sections that may summarize it?Which sections?
I think you must read the whole of any poem to understand it. "Song of Myself" should not only be read in its entirety, but it should also be read aloud to appreciate the beauty of the words and rhythm. I can give you a short summary here, but if you go to the link below, enotes has a much more detailed summary.
Basically, Whitman celebrates the spiritual connection between himself and all other humans, everything in nature, and the universe. He poses questions about the meaning of his own life as well as the lives of human beings. To Whitman, an individual has a unique and wondrous nature, but he also praises nature and all things found in nature. He celebrates human sexuality when he discusses nature and spirituality. He lists and celebrates people from all walks of life and their courage and resilience in enduring the hardships of their lives. He writes that a blade of grass is as wondrous and important as the work of the stars. He discusses faith and religion, finding God everywhere around him. In the last lines of the poem, Whitman urges his readers to search for truth and reassures them he will never be far from them.
As you can see from this very short summary, this poem is a celebration of life, and it certainly must be read to enjoy it and appreciate it.