Pull yourself together is phrasal verb which means to become calm and behave normally again after being angry or upset ( eg.Just pull yourself together. There's no point crying about it.). This is what all shrinks tell their disturbed patients. In this case, the patient has a condition in which he has a uncontrollable feeling that he is a curtain and doctor thinks he has cracked a pun ( because one often pulls curtains together) The patient goes ahead and does.......well, the picture is self explanatory.
picture yourself opening and closing hanging curtains. see the way they part (break) in the middle when you pull the string cord. now imagine yourself as a curtain. get it now?