If you are excited, your ability to concentrate fizzles out, whether you are happy or sad. Emotions are automated reactions to stimuli and serve to process a particular stimulus particularly quickly, with this effort then overriding everything else in the brain.
Stress, on the other hand, temporarily increases the ability to concentrate, but be careful, because stress is a biochemical blinker that narrows perception in order to cope as quickly as possible with a situation that is perceived as threatening.
That’s why people act particularly decisively and quickly in stressful situations. However, this does not always benefit people in their studies, for example in exams, because in an exam or presentation it is not the content but the situation that causes the stress, so that the stress then overrides the ability to concentrate on the content. So it’s best to simulate the exam situation beforehand to get used to it, because staying calm still helps the ability to concentrate the most.