Having your paper rejected feels a lot like getting dumped. But while there are plenty of good ways to alleviate the pain of romantic rejection, there seem to be few outlets to alleviate intellectual rejection. Perhaps answers to this question can help:
What are examples of influential mathematicians with famous rejection stories? Or highly regarded mathematical papers that had particular trouble being published? Especially, can you provide excerpts from highly critical referee reports of such papers (names elided, of course)?
Makes me think of this comment from Hermann Grassmann's Wikipedia page:
Also from the same page, this synopsis of the significance of his work: