Ex-RAF Recruiter, but as the military all work to the same basic standards for medicals my comments cover the Army too.
Some of the factors considered in cases of self-harm are: the number of occasions it was done; how close to the application, ie within the 2 years prior; the stressors and the motivation, ie stress relief or more serious.
Agree with the above as the only people with the knowledge and experience to decide if you could cope with military training and life are those with the knowledge and experience: the Army doctors. That's not to say you couldn't try reapplying in future, but it very much depends on the reason for the rejection.