I am persuaded that those who quite sincerely attribute their sorrows to their views about the universe are putting the cart before the horse: the truth is they are unhappy for some reasons of which they are not aware, and this unhappiness leads them to dwell upon the less agreeable characteristics of the world in which they live.
Bertrand Russell (1872-1970) English mathematician and philosopher
Conquest of Happiness, Part 1, ch. 2 “Byronic Unhappiness” (1930)
(Source)