Use 'keep from' to express control over emotions or reactions in difficult or surprising situations. Despite the setback, he kept from getting angry.
Pro Tip 2/3
Intentional Effort
Emphasizes the deliberate effort to avoid a certain action or reaction. She kept from interrupting the speaker, even though she disagreed.
Pro Tip 3/3
Subtlety
Can imply subtle feelings of difficulty or reluctance in the action being avoided. He couldn’t keep from smiling, despite the formality of the occasion.