Im lost and i dont know what to do.

(18m)My life sucks right now, and it always sucked, growing up I only had my mom and my brother, my mom would go around and "mess" with other guys for food and housing(self-confidence of fighting and seeing my mom getting hit), when i was 10 i was neglected and had to break into houses to feed my little brother, after that i was separated from my mom and brother and put into foster care where they didn't treat you right and pretty much used me to get money from the foster system. after a while in foster care, they sent me back to my mom because they said her lifestyle was more stable, but it wasn't. it was more of what happen before i went into foster care and alot of sleeping outside. I tried to kill myself then i was sent to a mental hospital for 6 months and then i was sent back home. then my life changed again after my mom pressed charges on me. why? it was because she hit me then i felt overwhelmed with anger and disgust and i hit her back. then i was sent to a Drug rehab (bobby Benson center) for violence which to them didnt make sense either. when i was there they had no treatment for me and i was pretty much locked in a room 24/7. the other kids were alot older than me i was 14 and turned 15 (other kids were 17-18) I got bullied and beaten up a lot. eventually i ran away and i was homeless. selling drugs and stealing to survive. I got robbed and a bunch of nasty stuff happened to me. I was finally able to get in contact with my dad because a cop arrested me and brought me to my nearest family member. this was the first time i meant my dad so i was excited and was hoping my life was going to get turned around. WITH IN THE FIRST WEEK THIS MF ABANDONS ME for drugs. super pissed about that i was homeless again and to be honest it hurt. after like 7 months i got arrested and cops brought me back to my mom. (16yo) then i started to go to school. it was hard cuz i needed to learn the basics of all the subjects of math English and history and it was getting annoying that all the other kids were more advance. i wasnt even making freinds and my social skills were awful, even just talking was super difficult. there was nobody that i can relate to and it was very frustrating. eventually i dropped out and and then i was sent to a program called hawaii national gaurd youth challenge academy. it was where troubled kids with no diplomas went. so i went there to earn a diploma it was basically a 6-month military bootcamp with volunteering and some education. i got beat up alot in there too but i stayed cuz i really wanted that diploma trying to change my life around. once i got out about to turn 17 and i earned my diploma i was approached by a recruiter one of the branchs. so i decided to join and they shipped me out to marinecore bootcamp right when i turned 17. while im in bootcamp i get a call from someone telling me that my brother is in juvinile detention center. anyways fast forward to now, now the issue is i have no friends/family, my communication is terrible and my social skills are terrible. im alone and i wake up do my job, go back to my barracks and sleep. people at work dont want to talk to me because im awkward and i dont blame them. i just need advice on what i can do to fix this. my self-confidence and my self image is terrible im depressed all the time and im pretty much a mute unless im asked about something like "where is the bathroom". and i also feel like i don't know who i am. is there anything i can do to fix myself i feel like a F*** up.