We are human. We all make mistakes. No one is prefect the first time out. You are now aware of your shortcomings. That's the start of working to "get it right" from here on out.
Forgive yourself for you past shortcomings and move on to better yourself and your dog.
Read, research and start formal training (by yourself or with a professional trainer).
You and your dog can learn together. Go back to the beginning. Build trust and work on focus. Start with the basics: loose leash walking, sit, stay etc.
Train in short sessions to start. You'll get it and so will your dog.
Help is always just a question away.