Living through difficult situations and coming out the other side can leave you better off I find. The old saying "what doesn't kill you may leave you stronger" seems to apply.
Other than the obvious ways of learning such as watching how to do it, listening to someone talk about it, read about it.. and so on, there is another less obvious one. It is available when we are tested by negative influences. This sort of learning cultivates self-discipline and has the added benefit of helping you avoid the pitfall of letting situations or other people manipulate you. These are those times when the natural tendency is to react in one of two extreme ways, either lashing out, or shutting down, sometimes referred to as the flight/fight response.
I have learned that cooly observing the negativity of a situation can teach me a positive lesson. I begin by refusing, or at least resisting the tendency of being overwhelmed by negative aspects. To do this yourself, try using those fifteen seconds you get when counting slowly as mom taught you, to let your mind begin taking a next step.
During that cool-down time, I decide whether doing something or saying something to get back at the world is going to help the situation, or make me feel better. Most of the time, during that slight pause, I find myself realizing that there is no way lashing out is going to make the person or situation better. If walking away, or somehow delaying reaction is possible, some good can often come of the situation. I had to learn that this walking away was not the same as fleeing, even when others might see it that way. A measured response, or some internal improvement that comes of such an event is worth more than a vengeful lashing out.
In the end, it is possible to make yourself a better person by simply observing behaviours that really turn you off, then becoming more determined than ever to avoid having others think about you that way.
There is another aspect of learning from negativity I would like to acknowledge here. When you have found and acknowledged negativity in yourself in the past as I have, it is a lot easier to be understanding, or at least less judgemental of the 'failings' of others. In other words, it is actually an advantage to have struggled in a positive way with negativity. You can find yourself in a better position to empathize with others and you might learn something too.