Never forget that Patanjali has written the first chapter for a very advanced student. This student needs very little and only the highest teachings to advance to the state of yoga. It takes a long time to be freed from desire, anger and greed. Ordinary mortals (like me) are better off with chapter 2, giving the foundational practices for the later work.
And don’t forget these are practices. Practices in awareness and in living. They are not dogmas to adhere to. Yoga is a path of liberation and that does not agree very well with a dogmatic approach. These are principles for practice. And your own experience is paramount. If you make a mistake, admit it, and try again. There is no point in blaming yourself.
So it is excellent to feel you anger! And you probably did the right thing by walking away at that the time. You have a right to feel your own feelings. Don’t deny them. Spirituality is a path of acceptance, both of your own anger and of what other people say and do.
I have found that the principles of non-violent communication often work well. This begins with awareness of your own feelings and of the situation. From there on, there are a number of steps, including (1) stating your view of the situation, (2) saying how you feel about the situation, and (3) expressing your needs compassionately and perhaps making a request. Maintain awareness at all times. Use first person statements (I see, I feel, I would like …), because this will prevent you from blaming others. Such as: “Dear friend, I hear you telling me that you don’t like the color of my eyes. I feel upset about this. I would like us to be friends, and this is hurting our friendship. In the future, please don’t do this again.” Like this.
Well, this has taken us some distance from sutra I-12. The sutra is about consistent practice and non-reactivity. As in sitting down for meditation every day. And then focusing your on your breath. Again, again, and again whenever your mind strays. And about being non-reactive to whatever comes up. And if you have a wonderful experience, don’t get attached to it. Just sit down again as if it were your first meditation session. There is no feeling of indifference in this, neither towards the practice, nor towards what comes up.
Hope this helps a little bit.
Namast?.