Going back to something you said previously, could you point m in the direction of where Epicurus has written similar ideas to Hume's?
https://plato.stanford.edu/entries/epicurus/ "The function of the human mind — that part of the soul that is located in our chest — is not to seek higher things, but to maximize pleasure and minimize pain. That is its entire objective; the risk (a substantial one) is that it may miscalculate, since it is subject to false beliefs and errors in cognitive processes."
Based on that article I would say Hume's overall body of work is by a wide margin more contemporary than Epicurus' if not more subtle and sophisticated. The passions-slave-reason quotation is really only a tiny part of his writing. For example, Hume provides an intricate and judicious account of epistemology in which causality is reduced to a kind of anthropic pattern-recognition. This reconciles his account of psychology with the enlightenment understanding of the scientific method, which did not exist at the time of Epicurus.