((((Rachell)))) My poor dear. I am so very, very sorry for your loss and the anguish you are feeling.
Your boyfriend sounds like a very hard-core user who simply had the unfortunate luck of being bitten by the snake of addiction. This does not mean he was a bad person or that his intentions were never good. It just simply means that he suffered from an incurable disease -- one that can only be managed by the power of God Himself!
Please don't blame yourself -- there is nothing you did wrong at all. You loved him and took care of him the very best you could. Loving an addict is the toughest job there is.
The questions you have need not be answered now. Just allow yourself to mourn this love of yours and try your best to forgive him for what he has done. I'm sure he died with a mountain of regret on his shoulders, but he is at peace now, thank God.
Be gentle with yourself and just go on loving him. It's OK. There is a lesson for you here, however, so be careful to make note of it and don't let this snake into your life ever again.
Please keep in touch and let us know how you're getting along. We are here for you day and night.