At school, it can be annoying when you have to go up to sharpen your pencil because it has broken. I have tried using it more gently. Any other ideas? What should I do?
You can use carpenter pencils. They are more rigid and don't usually break at all. Also, they are sharped using a knife which I found to be more readily available then pencil sharpeners.
Don't sharpen it as much to start.
You should sharpen it to be useful but not so much that it is particularly pointy. This will give it more support and have it break less often.
It should look more like the first than the second
I prefer mechanical pencils, but the quality and grade of the pencil will determine how durable it is. Pencil lead is a mix of graphite and clay, sometimes with additional materials to hold it together. Higher quality pencils may have something like "chemically bonded" printed on them, which indicates that there are extra adhesives in the lead to make it stronger.
Pencils also have a grade marked by the letters H (for hard) and B (for black). The most common grade is HB which gives a good compromise between well defined lines and darkness of the line. If you choose a B grade, maybe B2 or B3, the pencil will be softer and less likely to break because although it is softer, it is less brittle.
Take care of your pencils. Dropping them or shaking them around in a pencil case with other pens and pencil can cause fractures in the lead that aren't apparent until you've sharpened them down to that point.
There are many pencil sharpeners available that catch and store the shavings. If you use one of these, you shouldn't need to move from your desk when you have to sharpen a pencil.