There is a Buddhist prayer that translates as "May I be given the appropriate difficulties so that my heart can truly open with compassion." In the Tao Te Ching, a classic manual on the art of living, it is written that the human incarnation entails 10,000 joys and 10,000 sorrows. Being grateful for the joys tends to be easier than being grateful for suffering but both are important aspects of a spiritual life.
What if on some level we recognize what it is that we need to grow into where we want to be, and manage to find a way to manifest the perfect learning environment for ourselves? The expression "Be careful what you ask for, you just might get it" implies the universe's willingness to give us what we want, but not always gift wrapped in the package we would prefer. If you ask for patience you just might find that your life starts to demand that you experience the process waiting on a whole lot of interesting levels. How better than with practical experience would you truly learn to become patient? What would it be like to be grateful for these challenging opportunities for growth as they occur?
Could it be that the most difficult and obnoxious people in our life are really our best teachers? In the book "Thank You For Being Such A Pain", author Mark I. Rosen wrote that "the most powerful option for dealing with a difficult person is personal growth". Often what makes us most uncomfortable in others is a reflection of some shadow part of ourselves. If we can observe the dynamics of our interaction without staying caught up in them, we can perhaps learn something about ourselves and increase our compassion for the struggle of others.
Jack Kornfield, a Western Buddhist teacher, often talks about how to avoid getting caught up in your personal life dramas by instead focusing on the beauty that surrounds you. Practicing this shift of attention requires the willingness and discipline to inhibit and to then redirect your attention in order to cultivate more gratitude and joy in your life. My favorite example of this is a Haiku by Mizuta Masahide, a 17th century poet and samurai:
Barn's burnt down
Now I can see the moon