The expression TO GET A GRIP ON YOURSELF or simply TO GET A GRIP means to get control of your thoughts and emotions and stop behaving in a foolish or uncontrolled way:
Get a grip on yourself! It’s just a little spider.
Don’t be hysterical, get a grip on yourself.
What is he doing? Tell him to get a grip on himself.
I’ll talk to her as soon as I get a grip on myself.
You shouldn’t talk to him now. Get a grip first!
Here’s the video version of the article: