A feeling of sadness and longing, That is not akin to pain,
Still, before we get to the main action of the poem, the speaker wants to be sure we understand what he means by "sadness."
This isn't like end of the world, wish-you-were-dead kind of sadness. Have you ever been so sad it physically hurts? That's not what's going on here at all.
He wants us to know that this feeling of "sadness and longing" it isn't like ("akin to") pain. He's just a little down, like how you might feel on a rainy Sunday without much to do.
And resembles sorrow only As the mist resembles the rain.
To make this point extra clear, the speaker goes on. He's not feeling the real pain, or "sorrow," he's just a little bummed. To illustrate this idea, he brings back the image of rain and mist that are all around him.
He tells us that his sadness is a little like real depression, but not really. It's sort of like a cousin of sorrow.
Basically everything in this poem, even the sadness, is pretty chilled out.