Pull oneself together
Regain control of one’s composure and emotions, otherwise risk falling apart, dates from the second half of the 19th century.