The joke is a pun on the phrase 'pull yourself together'.  The phrase is usually used to mean 'fix yourself' or 'get yourself back in a normal routine or good health'.  One would also literally pull curtains together to close them.
Doctor , Doctor I feel like a pair of curtains - Well pull yourself together then . Next .