From Maurizio Viroli's Machiavelli:
If repentance and penitence were not [Machiavelli's] way to find shelter or relief from the miseries of life and the horror of death, what then were his defences?
One was irony. To laugh at one's own and others' weaknesses alleviates 'the pains that every man bears'. Life 'is short', and 'many ills and strange events crush almost all mortals': it makes no sense to live only with labour and toil. When life is miserable, when we are powerless against men's stupidity and meanness, it is time to look at the world and ourselves with irony.
Whatever else you might think about him - for example, the casual misogyny of the thought that it followed from fortune being a woman that the best way to deal with her was to "beat and ill-use her"; the archpriest of evil politicking view is a bit old-hat, these days - apparently Machiavelli at least had a sense of the absurdity of life.