Don't let your temper on a nonsense thing, you would end up hurting not only yourself but others.
Comments and correction please ☺️
Don't get angry about / Don't lose your temper over
something silly or small. You might end up hurting yourself and also others.
"Not only.... but also..." is a good construction, especially for formal writing.