Addiction is a terrible thing, and abusing pain medications is not good for anyone's mental state, but I'm not sure I see how it can be a cause for a murder which entailed so much advanced planning. This was not a crime of passion, heat of the moment.
I'm sure his defense attorney will try to find a way to use that, but he had to be functioning at quite a high level to do all the stuff he did - making sure he had plenty of cash, wearing a mask everywhere, procuring a bike, figuring out when BT would be walking down the street, disappearing afterwards, wearing hoodies to cover his hair, and on and on.
Addicts typically commit crimes involving theft because they need money to buy drugs. This guy had thousands of dollars on him, so that motive is out. Plus he wrote his "manifesto" about his motives, which are ideological in nature.