Just as there are support groups for loved ones of alcoholics (Al-Anon), there are ones for family members of drug users called Nar-Anon. I recommend that you read about this organization on-line and attend a meeting in your community. Perhaps, your mother would go with you for moral support.
The purpose of these groups is to provide a safe space for attendees to share common concerns about the addicts in their lives. They get support and advice from those who've traveled a similar path. Most importantly, they see that they're not alone. They realize that they need to change themselves and stop trying to change the addict.
At Nar-Anon meetings, addiction is presented as a disease. Therefore, when an addict chooses drugs over them, family members know not to take it personally. Instead of continuing to fight this problem, family members learn to practice acceptance and, from that acceptance, they find serenity.
It's only natural that you'd put up walls with your dad to protect yourself. It's extremely difficult (mostly, impossible) to have a decent relationship with an addict. They're thinking about their next fix so they're not emotionally available. They're often untrustworthy and unreliable. They disappoint you again and again. It's far wiser to spend your time and energy on healthy people who can have a reciprocal relationship with you.
My 82-year-mother had an alcoholic mother who died from cirrhosis of the liver when she was 8. Sadly, she never took the time to learn about addiction at any point during her life. To this day, she continues to say “my mom chose booze over me.” This deeply-rooted belief greatly damaged her self-esteem. She then passed this lack of confidence on to her four children, including me, who have all suffered because of it.
I hope that you'll learn about addiction now so you'll have a bright future and not interpret your dad's behavior as a rejection of you.