Let them know that you like them. Look for things to praise, especially in students who are discipline problems. Accept them as worthwhile, in spite of their misbehavior. Disapprove the act, certainly, but not the individual. Don't try to do the impossible.
Some students have emotional problems only a better trained person can solve.
When a youngster is a consistent trouble-maker, and all your efforts to help him fail, the time has come to refer him and his parents to a psychologist, psychiatrist, or to an agency which provides such service. There are limits to what a teacher can do in child study, diagnosis, and treatment. Control your temper. Flying off the handle shows students that they've gotten through to you. When you lose your cool you lose your ability to solve the discipline problem sanely, rationally, and thoughtfully.