The best way to actively differentiate between the subject matter and the theme of a poem is by identifying the purpose that they serve, and how the author might make use of them. However, there are some other ways and "tricks" that can help you along the way.
A subject matter is defined as the central focus, or topic, of the poem. In a very interesting discussion in MagmaPoetry Magazine, it is debated whether the subject matter is important to a poem, since the form and use of literary devices are often the focal points. However, it is impossible to wrap figurative language and imagery around nothing; there MUST be something, either abstract or concrete, onto which we will base poetry. That is one for the experts but, for us who are just admirers of poetry, that may make sense!
One trick that may help identify a SUBJECT MATTER is to identify it in the titles. Sometimes it is way easy. An example of subject matter in poetry is also found in the titles: "The Raven", "Ravenna", "The Ballad of Reading Gaol", and others. Now, keep in mind that some poets are so metaphysical that they may title a poem with words that have nothing to do with the poem itself, so this trick only works in most, but not all, cases. It helps, though.
Let's discuss theme: the theme of a poem is the combination of thoughts, messages, and ideas that the poet is able to convey upon the reader. It is the inspiration behind the aesthetics of poetry. We can think of theme as the "emotion" of the poem. For instance, the poem "The Raven" has, as a subject matter, a raven that shows up at the home of a very lonely and mournful man. However, the themes of "The Raven" are plentiful and evoke additional main ideas, for example: death, grief, darkness, loneliness, sadness.
A good trick for differentiation that seems to work for some students is separating the title from the poem. Read the poem without reading the title, or pretend that there is no title. Then, extrapolate what are the messages that you "get" from the poem. Whatever you write down as the messages that you "get", or the lessons that you learn, are the themes of the poem.
Then, ask yourself "what is the poem about", without emotions, or without "messages sent". If you can say in ONE word, "This poem is about _(blank)____," then you have your subject matter.
If your teacher has assigned more than 2 poems for you to study, print them separately, (enlarge them in the printer so the letters look bigger), and cut the titles out. Then read the poems and identify the themes of each. Keep in mind that subject matter is ONE while themes can always be more than one. Once you get the themes down, analyze each of the titles to see if you can make the connection between the title and the content. You may be able to extrapolate the subject matter there.
I really hope this works for you!