When I get frustrated I sometimes forget my keys.
Do you think that frustration affects your memory?
I don't know, maybe. But it's annoying.
While it's normal to forget small things like keys sometimes, you can't always get angry and frustrated about it. It will only make your memory worse and clouded, so you have to take a breather and just retrace your steps calmly.
Are you saying I should forget this situation entirely?
I'm not saying that you should forget the situation, I'm only saying that you should be more aware of how your frustration affects your mental health. It may be helpful to talk to somebody if you can't regulate your own emotions. Even so, if you're only forgetting your keys, that's quite common so try not to overthink it.