But Riley had headed to the war zones. And she’d managed to keep it together for a long time.
I found this definition for "keep it together":
To maintain composure; to avoid an overly emotional reaction; to suppress an instinct or urge. 
Is it a correct definition?
The full text is here:
Riley watches nervously out of the car window, peering into the shadowy woods, trying not to imagine someone jumping in front of their car at any second, waving them down. She clenches her hands into fists inside the pockets of her down jacket. She reminds herself that she’s not in Afghanistan anymore. She’s home, safe, in New York State. Nothing bad can happen to her here. Her career has changed her. Seeing what she has seen, Riley is so different that she hardly recognizes herself anymore. She glances furtively at Gwen. They’d been close once. She’s not even sure why she agreed to come with her to this faraway country inn. She watches Gwen concentrating fiercely on the winding road up the slippery incline, heading into the mountains. “Are you okay?” she asks suddenly. “Me?” Gwen says. “Yeah, I’m fine. We should be there soon.” In journalism school, when they were both at NYU, Gwen had been the steady, pragmatic one. But Riley was ambitious—she wanted to be where it was happening. Gwen had no taste for adventure. She’d always preferred books, and quiet. Out of journalism school, unable to find a decent job at a newspaper, Gwen had quickly parlayed her skills into a good corporate communications position and had never seemed to regret it. But Riley had headed to the war zones. And she’d managed to keep it together for a long time. Why does she do this? Why does she keep thinking about it? She can feel herself starting to come apart. She tries to slow her breathing, the way she’s been taught. To stop the images from coming back, from taking over.
An Unwanted Guest by Shari Lapena