There are many causes of short term memory loss. Some are neurological and require an examination by a neurologist. Others are psychological, and in your case, it may be a matter of performance anxiety..afraid to make a mistake and being overly concerned and conscious, rather than normally confident and natural.
I'm 19 years old and just got discharged from the Marine Corps for suicidal thoughts. I've been home for 3 months and slowly it seems my short term memory is really bad. I'll be upstairs in the living room and think "Gee, I should put on some deodorant" and the next thing I know i'm in my room which is downstairs putting on deodorant with no memory of walking to my room. I can have my dad tell me to do something and I go to do it and then completely forget what i was doing and it takes awhile for me to remember that dad told me to do something and then it takes a little while longer to remember what it was. I don't know if i should see a Dr. or not. I'm starting my 3rd year of college next week and I'm worried that I won't be able to function. I'm also concerned that maybe I shouldn't drive because I'll forget where I am for a sec and then it takes me awhile to remember where I was planning on going. I keep losing my train of thought as I'm writting this. Could this be triggered by depression, dehydration, or maybe ADD? Should I seek medical attention. I think maybe I'm regressing back to my life in the Marines. I've been somewhat obsessive about it since I've been discharged and as I'm writting this I'm wearing my Marine Corps PT gear. The only thing I can remember stuff about seems to be the Marines but even at times I completely forget basic stuff. What kind of Dr. should I go to?