compartmentalize
To separate your thoughts or feelings into different mental boxes.
To compartmentalize means to separate different parts of your life or different thoughts and feelings into distinct mental boxes, keeping them from mixing together or affecting each other.
Imagine your mind has different drawers, like a desk organizer. When you compartmentalize, you put school worries in one drawer, family matters in another, and friendship problems in a third. You open only one drawer at a time, so when you're working on math homework, you're not also thinking about yesterday's argument with your friend.
People compartmentalize for different reasons. An athlete might compartmentalize their nervousness before a big game, putting those feelings aside so they can focus on playing well. A student might compartmentalize their disappointment about a bad grade on Monday's test so they can concentrate during Tuesday's lesson. Some people are naturally good at compartmentalizing, while others find their thoughts and feelings spill into different parts of their lives more easily.
Compartmentalization can be useful for staying focused and managing strong emotions, but keeping everything rigidly separated isn't always healthy. Sometimes different parts of your life need to connect. If you're exhausted from staying up late every night, compartmentalizing that fact away won't help you succeed in school. The key is knowing when separating things helps you think clearly and when you need to look at the bigger picture.