Large was his bounty, and his soul sincere, Heav'n did a recompense as largely send: He gave to Mis'ry all he had, a tear, He gain'd from Heav'n ('twas all he wish'd) a friend.
He might have had humble beginnings, but he did pretty well for himself—he was generous and sincere, and Heaven paid him back (sent a "recompense") for those good qualities.
The speaker gave everything he had to his depression, or (as personified here) Misery—in other words, his tears.
But Heaven gave him something pretty awesome: a friend.
Fun fact: The speaker's probably referring to his BFF, Richard West (see the "In a Nutshell" section for more on that).