It is a comfort to the miserable to have comrades in misfortune, but it is a poor comfort after all.
or simply: