Not, I'll not, carrion comfort, Despair, not feast on thee; Not untwist—slack they may be—these last strands of man In me ór, most weary, cry I can no more. I can; (1-3)
Check out all those "not"s—four of 'em in the first three lines of the poem alone. That's the sound of someone steadfastly refusing to give in. While this opening details the speaker's challenges with Despair, it also asserts his grit and determination to persevere.
Can something, hope, wish day come, not choose not to be. (4)
Here the speaker relates that hope is his secret weapon. Believing that the sun will come out tomorrow (sorry, Annie fans) is what keeps him going, what allows him to make the choice to persevere, rather than end his life.
Why? That my chaff might fly; my grain lie, sheer and clear. (9)
Bonus—the speaker's perseverance pays off here, in a big way. It allows him to undergo a personal transformation, one that leaves him stronger and more confident, stripped of the "chaff" of his weaker personal qualities.
Nay in all that toil, that coil, since (seems) I kissed the rod, Hand rather, my heart lo! lapped strength, stole joy, would laugh, chéer. (10-11)
"Kiss[ing] the rod" of his punishment here, or the hand that wielded the rod, indicates a kind of perverse gratitude on the speaker's part. Now that he knows that he can endure the depths of depression, he's grateful to whatever force (Despair, or Despair-sent-by-God) put him through his trials in the first place. He's learned how to persevere, and for that he seems truly thankful.