It is a well known observation that women generally get very emotional and irritable during menstruation due to hormonal activity and sharp physical pain. Even if you are referring to a different kind of pain, the mind has the potential to rise above all that and act gentle and kind.
A good starting point to strengthening the mind like that would be to firmly stand on the principle that whenever you feel angry, upset or sad, the fault is always within you. In other words, whenever you become upset, you are doing something wrong here and now. But the good news is you also have the capability to stop doing that here and now. Once you agree to that principle, it becomes easier for you to be mindful in unpleasant situations.
Tunnel vision is not a bad thing if you can apply it properly. Any situation you run into in life is simply eye & forms, ear & sounds, nose & aromas, tongue & flavors, body & tactile sensations, mind & thoughts. Nothing else! If you have that type of tunnel vision, you are less likely to get upset by painful or undesirable experiences.
On a more mundane level, you can also practice Metta(loving kindness) meditation on the go. Whenever you get upset at a person, mentally chant words of lovingkindness towards that person and block the anger from taking charge of the mind. This is hard at the beginning, but if you practice it for about a month, it becomes easy and really enjoyable.