Yes, I believe every undergraduate experienced this. My advice, is stop whatever you're doing. And just take a quick walk, until your mind is clear again. Once your mind is clear, then you can study. You should never study while being stressed out. It makes it harder to comprehend even the easier materials. Reason why most people that crams materials usually do not preform as well. They are stressed out while studying. You should study with a clear mind, by working out or take a jog.