Loss of temper is a psychological reaction.
This means that you have a choice concerning your own behaviour.
It is not necessary to lose your temper.
Try meditation, contemplation or reading book about your problem. Find constructive ways to avoid conflict.