I published, privately, a collection of my serious poetry I had written over the years. I only published 50 copies, which I gave to friends, in a special deluxe edition. It was ridiculously expensive but I'm glad that I did it.
Writing is so wrapped up in ego, but with math one is just trying to get it right, although you're often wrong. I think math helped me become a good critic of myself, come at writing a little less personally.