For the heart whose woes are legion (line 39)
Here's another line that emphasizes the speaker's pain, just in case we weren't up to speed yet. His heart is filled with painful memories, and he's not shy about letting us know it. Still, we should point out that the speaker doesn't refer directly to himself here. He doesn't tell us that his own "woes are legion." He just refers generally to sadness and unhappy people, and lets us draw our own conclusions.
And thus the sad Soul that here passes (line 49)
Again, he's really sad. Super, intensely, totally sad. In an unexpected way, though, spending time in this sad world seems to make him happy. In these lines he's talking about how he can't fully see or touch this weird world, but we can still tell that it makes him feel better. You know how people say that misery loves company? We think there's a little of that going on here. Being in a world of sadness helps our speaker to feel better about his own lonely misery.