zebrać myśli

Etymology
lit. 'to gather [one's] thoughts'.

Verb

 * 1)  to collect one's thoughts, to collect one's wits, to gather one's thoughts, to gather one's wits