In mindfulness, we try to stay in the present moment, being aware of what we are doing and experiencing right here and right now. For the most part, the things that upset us are things that happened in the past, even if the past was just 5 minutes ago. Dwelling on the past would be outside of mindfulness.
A great dhamma talk I've read on this subject is from Ajahn Sumedo called In the moment of mindfulness, there is no suffering.
In the moment of mindfulness, there is no suffering. I can’t find any suffering in mindfulness; it’s impossible; there’s absolutely none. But when there’s heedlessness, there is a lot of suffering in my mind. If I give in to grasping things, to wanting things, to following emotions or doubts and worries and being caught up in things like that—then there is suffering. It all begins from my grasping. But when there is mindfulness and right understanding, then I can’t find any suffering at all in this moment, now. This is about this moment here and now.
I encourage you to read the rest of the dhamma talk to be inspired to try to live in this present moment.
Regarding realizing you are upset about something that occurred in the past, the simple technique of noting and observing your feeling, such as noting "angry...angry" or "disappointed...disappointed" without replaying in your mind the incident which made you angry or disappointed can help you see that feelings such as these are fleeting and impermanent. They come and go and we can help ourselves see their impermanent nature by not "feeding" them with overthinking them or dwelling in the past but remaining in the present moment and impartially observing that feelings arise and cease.