How we feel impacts our learning. Emotions can disturb our focus. Although the Zimmerman model of self-regulated learning puts less focus on emotional self-regulation than other self-regulation models, it does refer to it under 'environmental structuring'. It covers strategies you can use to cope with distractions in your environment as well as within yourself. Not feeling ok can be seen as an internal distraction.
As teachers, we don't always know how students are feeling. At primary school Toverbos (Brasschaat, Belgium), they ask students to check-in after in the morning and after each break. Students pin their name to the emotional state they are currently in:
I'm feeling fantastic
I'm feeling good
I'm feeling ok
I'm feeling sad
I'm really not feeling ok
With this practice, teachers do two things at the same time. First, they assess students' emotional state by explicitly asking students how they feel. Second, they support students in emotional regulation, as the first step is to recognize and name ones own emotions. After students checked-in, the teacher may choose to speak to one or several students or engage in a group discussion. Most of the times, it's the teacher checking with the students who don't feel good what they want to share, and what they themselves or others could do to help them feel better.
This practice takes place with 9-10 year olds, but it can be adjusted to fit the needs of other ages. When students grow older, you can introduce more specific feelings so they learn to describe them accurately. Also, you could help them understand how their emotions impact their learning, how they can detect it when it is happening, and what strategies work for them to handle the emotions and regain focus on learning.