compartmentalize

To separate your thoughts or feelings into different mental boxes.