I have experienced something similar, but there is an aspect to it that doesn't relate to immaturity. As a middle-aged person with a lot of life experience, I have experienced negative emotional loops. Ni sees patterns that reduce down to singularities and Fi experiences a sense of values relating to these patterns. When I am stuck in a negative emotional/social loop it is because the external pattern feels so absolute and overwhelming. The sense is that people will always fall into this behavior, and I feel trapped. This is especially difficult when there doesn't seem to be an answer for correcting the problem externally. It makes it possible to become very depressed about the nature of reality and the hurtful patterns that are so entrenched in humanity.
I had to develop a cognitive technique to help break the cycle. I will deliberately meditate on random associations in my mind to try to breakup the deeply entrenched neuro-pathways. I'll think of the most random series of concepts I can like: "pencil, rowboat, page 47, nebula, horse saddle, Capricorn, statistics, etc." It is difficult to make the transition, but this technique has helped me when I felt like I couldn't break out of it.
The reasoning that I use when getting stuck in a loop long after the outside people have forgotten an incident is this: if those people were capable of that hurtful behavior in that instance in the past, then it is part of who they are. They will do it again. Even if they forget about it, the nature of that behavior persists, and has in no way ended. If I couldn't figure out how to deal with it internally or externally in that past moment, then I'm doomed to be hurt again. In this way I obsess on it until I can find a solution, but in dealing with people there are often no solutions because the nature of people is such that they are going to behave a certain way, so I have to develop the skill to respond with apathy, to avoid them, or develop an assertive tactic that puts a stop to it. Those are the options, and sometimes they can all feel out of reach if the emotional impact is painful enough.