Shakespeare's Sonnet 29 is a masterclass in emotional contrast, pivoting on a single thought.
Social disgrace, envy of others' gifts, self-hatred, alienation from heaven, fortune, society, and self. The speaker is in a "cursed" state, deaf to his own cries.
The memory of the beloved lifts him "like to the lark at break of day arising / From sullen earth." He sings hymns at heaven's gate. "Sweet love remembered" brings wealth that makes him "scorn to change my state with kings."
"Haply I think on thee"—a voluntary mental turn. Within the prison of despair, the speaker exercises agency: he chooses to remember. That single thought restructures his reality.