Almost all of Uncle Shakespeare's sonnets have what's called a "turn" or a "volta," which is just a fancy schmancy way of saying that there's a big dramatic shift somewhere in the poem. In Sonnet 29, the big dramatic shift happens at lines 9-10, when the speaker goes from being the biggest Debbie Downer ever to feeling totally happy when he suddenly remembers that there's someone out there who loves him. Check it out:
Yet in these thoughts myself almost despising,
Haply I think on thee,
Here, the word "yet" is the big tip-off that the speaker has just had an "ah ha!" moment and is beginning to snap out of his bad mood. "Haply" means "by chance," and it's also a pun on the word "happy," so we get the sense that, when the speaker just so happens to think of "thee," it fills him with joy. This has a pretty big effect on how we experience the poem because it makes us feel as though the sonnet is happening in real time—as if we're experiencing the speaker's thoughts and emotions as they unfold.