Another technique for fending off suffering is the employment of the displacements of libido which our mental apparatus permits of and through which its function gains so much in flexibility. The task here is that of shifting the instinctual aims in such a way that they cannot come up against frustration from the external world.
Sigmund Freud, James Strachey, Anna Freud, Carrie Lee Rothgeb (1961). “The Standard Edition of the Complete Psychological Works of Sigmund Freud”