David Hume said this quote

We choose our favourite author as we do our friend, from a conformity of humour and disposition. Mirth or passion, sentiment or reflection; whichever of these most predominates in our temper, it gives us a peculiar sympathy with the writer who resembles us.