Peach tree borer
The presence of gum or sap on the peach tree can be a natural response to defend wounds on the tree caused by factors like bark cracks, insect feeding, mower injury or drought. This is the tree's natural response to a source of stress.
The peach tree in your photo looks like it was subject to some type of mechanical damage. It looks like it may have been hit with a string trimmer and the trunk looks girdled. We cannot say for sure if it is borer damage. One or two borers can kill a tree. The stress weakens the tree and makes it more susceptible to insect and disease problems. No chemical control is recommended.
The tree looks stressed and it may limp along but may not be a fully productive tree. At this point, we recommend removal.