"[G]et my thoughts in order" sounds natural to me. I probably would not use this expression myself, but I have known people who did.
Depending on the context, here are some less formal ways to fill in the blank:
Give me a minute to _______________.
"get my head screwed on tight"
"take this in" / "absorb this" / "process this"
"calm down" / "relax" / "chill" / "chill out"
In these expressions, "this" refers to an event that has recently occurred, or information that has just been given to the person who needs to think.
"[S]ober up" only makes sense in a context where the person is intoxicated (perhaps because the person has been drinking alcohol). It is also metaphorical, not literal. It is therefore less formal than most of the options, but more formal than "get my head screwed on tight", "chill", and "chill out".
"[S]witch gears" implies that the person was thinking about something else, and needs to collect their thoughts about the current topic.
It is also possible to shorten the sentence to
"Give me a minute."