What is the context of Shakespeare's sonnet "A Consolation"?
The context of Shakespeare's sonnet "A Consolation" is that the speaker has fallen on disfavor from his fellow man--and apparently not for the first time. The cause of the disfavor is not stated. If Shakespeare is here speaking for himself, perhaps his latest sonnets or a production of The Two Men from Verona were not well received.
The speaker describes himself as being an outcast who cries out to a heaven that has metaphorically turned a deaf ear. As a result he curses himself while he wishes that he was like some other man who had the gift of hope or another man who had friends or another who had art because he is discontent with his own art and talents.
The final part of the context is that he remembers his beloved and suddenly his feelings and psychological agony turn metaphorically to a lark singing at the break of new day and he, like the lark, sings hymns to heaven. He ends by saying that he finds such wealth in his beloved that he--now--would not trade lives with a king. His beloved is his consolation in the face of failure and despair and gives him the metaphorical light of a new day.