I've been self harming for years and I want to get help but I'm scared I'll be locked up in a mental hospital.
You might not need inpatient treatment. Why do you think you will have to go to a mental hospital?
I know a lot of people who were institutionalized and those experiences have been very negative
It's good that you want to get help. You should talk to your doctor and find out what your options are.
I'm only 13.
I think given your age it's important that you try asking your parents for help. They should be able to find a therapist for you to talk to who can help. I'm sure your parents want the best for you, and will be glad to help.