A sonnet is a 14-line poem in iambic pentameter with a prescribed rhyme scheme. A Petrarchan (or Italian) sonnet consists of an octave (first eight lines) and a sestet (last six lines). A Shakespearean (or Elizabethan) sonnet consists of three quatrains (4-line units) plus a couplet (2-line unit). In a Shakespearean sonnet, the rhyme scheme is ababcdcdefefgg.
Not surprisingly, Shakespeare's Sonnet XXXI meets all the requirements for a Shakespearean sonnet. Its rhyme scheme is ababcdcdefefgg. The only thing one might find confusing about the rhyme scheme is that lines 2 and 4 don't seem to rhyme, and lines 10 and 12 don't seem to, either. With lines 2 and 4, the end words are "dead" and "buried." This is solved by making "buried" a three-syllable word: "bur-i-ed." The iambic rhythm also requires this; otherwise the line would only have nine syllables rather than the required ten. Given the time period when it was composed and the conventions of poetry, this pronunciation for "buried" is acceptable.
Regarding the words "gone" and "alone" that end lines 10 and 12, although they do not rhyme in modern American dialect, it is not hard to hear how they could rhyme when spoken in a certain accent. For example, imagine the word "gone" being spoken with an Irish accent, and you will note that it comes closer to rhyming with "alone" than when you pronounce it with American pronunciation. Actually, pronunciations of English words have changed dramatically since the time of Shakespeare; that is why two-thirds of Shakespeare's sonnets contain "rhymes" that no longer rhyme today. To find out more about how words were pronounced in Shakespeare's day, view the video at the link below.