Thanks Webster: http://www.merriam-webster.com/dictionary/compartmentalize
: to separate (something) into sections or categories
: to separate (two or more things) from each other
Psychology defines compartmentalization as a defense mechanism, or a coping strategy, which doesn’t impart a very good connotation. Put simply, it’s how our minds deal with conflicting internal standpoints simultaneously. Some examples would be: a doctor who is religious, but has to separate her belief system from her practice at a women’s health clinic; a man who leaves his office at 6pm, and refuses to think about work for the rest of the evening, so he can enjoy his time with his family or, at its extreme, soldiers who need to file away the trauma of horrific events in their minds, so they can continue operating in battle.
Coping strategies are short-term solutions, and they have positive and negative aspects. You want to compartmentalize, but not push out. For instance, those soldiers I just mentioned; pushing out trauma works in combat, but once they come back to their regular lives, they often find those pushed away memories coming back to haunt them, like in cases of Post Traumatic Stress Disorder.