I searched the meaning of the word get ahold of something which showed:
If you get ahold of someone or something you manage to contact, find, or get them.
But in the below paragraph the meaning doesn't fit well.
"Then there’s the other personal root for this book. I am by nature majorly pessimistic. Give me any topic and I’ll find a way in which things will fall apart. Or turn out wonderfully and somehow, because of that, be poignant and sad. It’s a pain in the butt, especially to people stuck around me. And when I had kids, I realized that I needed to get ahold of this tendency big time. So I looked for evidence that things weren’t quite that bad. I started small, practicing on them—don’t cry, a T. rex would never come and eat you; of course Nemo’s daddy will find him. And as I’ve learned more about the subject of this book,there’s been an unexpected realization—the realms of humans harming one another are neither universal nor inevitable, and we’re getting some scientific insights into how to avoid them. My pessimistic self has a hard time admitting this, but there is room for optimism."
This paragraph is from the book Behave by Robert M Sapolsky.