How can I stop feeling like i´ve become an idiot when I forget things?

Brain Fog. You may be suffering from cognitive dysfunction, "brain fog", brought on by underlying conditions that affect mental function, performance and memory loss. Many times, this may be due to lack of hormones (thyroid, estrogen, testosterone, dhea & pregnenolone) and/or b vitamin deficiencies. Have these evaluated and treated. Most times, your brain function will return.
Memory. You are being overly critical of yourself for something we all encounter. Give yourself some room to make mistakes, and always remember when you make a mistake it does not mean you are a mistake. If your memory fails you consistently consult your doctor to rule out any medical issues and if cleared you could seek advice from a psychologist. Best wishes.