In order to compare and contrast works by either the same author, or different authors, the easiest thing to do is look at the imagery, symbolism and themes.
Overall, both "Sympathy" and "The Haunted Oak" use elements of nature as a portal to explain something more. Therefore, one could focus upon how nature is regarded in order to compare and contrast the poems.
Another point to examine within the poems would be the idea of solitude and imprisonment. Both poems speak to the fact that the subjects, a bird and a tree, are alone.
One last point to make when comparing and contrasting poems is the message the author is trying to get across to the reader. What is the author saying in each of the poems? Is the reflection the author is offering similar? If so, how? Is the message different? Again, if so, how?
Basically, when comparing and contrasting anything, the purpose of the text is to examine how the texts are the same and how they are different.