From Two Concepts of Liberty:

I am the possessor of reason and will; I conceive ends and I desire to pursue them; but [when] I am prevented from attaining them I no longer feel master of the situation. I may be prevented by the laws of nature, or by accidents, or the activities of men, or the effect, often undesigned, of human institutions. These forces may be too much for me. What am I to do to avoid being crushed by them?  I must liberate myself from desires that I know I cannot realise. I wish to be master of my kingdom, but my frontiers are long and insecure, therefore I contract them in order to reduce or eliminate the vulnerable area. I begin by desiring happiness, or power, or knowledge, or the attainment of some specific object. But I cannot command them. I choose to avoid defeat and waste, and therefore decide to strive for nothing that I cannot be sure to obtain. I determine myself not to desire what is unattainable.

….

In a world where a man seeking happiness or justice or freedom (in whatever sense) can do little, because he finds too many avenues of action blocked to him, the temptation to withdraw into himself may become irresistible. It may have been so in Greece, where the Stoic ideal cannot be wholly unconnected with the fall of the independent democracies before centralized Macedonian autocracy. It was so in Rome, for analogous reasons, after the end of the Republic. It arose in Germany in the seventeenth century, during the period of the deepest national degradation of the German States that followed the Thirty Years War, when the character of public life, particularly in the small principalities, forced those who prized the dignity of human life, not for the first or last time, into a kind of inner emigration. The doctrine that maintains that what I cannot have I must teach myself not to desire, that a desire eliminated, or successfully resisted, is as good as a desire satisfied, is a sublime, but, it seems to me, unmistakable, form of the doctrine of sour grapes: what I cannot be sure of, I cannot truly want.