"How you deal with it" is to seek counseling, especially if you have young children. It is not to start doing drugs and committing criminal acts. You made a choice and your child is who suffered most. He lost his father and rather than provide him the support he needed, his mother turned to drugs than left him with a "friend" for most of his childhood. You could have been Mother Theresa before that, but it is what has happened since that matters.
Even if you had someone at the school system who was willing to break the law on your behalf and look the other way, insurance companies are not going to insure a person's friend's child without a court order giving them guardianship. That is just one example. If this poor kid has essentially just been a "visitor" in the friend's home for the past decade +, that is truly unfortunate for his sake, and rural or not, CPS let this child down horribly. It would be by sheer luck that his lack of an available legal guardian never became an issue. The odds are very much against any kid getting through that many years without having an actual legal guardian who was not dead or incarcerated. A letter from you means absolutely nothing as far as the law is concerned.
Either way, if this friend objects to the child they raised suddenly living with you before he turns 18, your chances of getting a court to side with you are slim to none. At best, you might get visitation, though would also very likely be on the hook for child support if you are still the legal mother. You really need to talk to this friend. It isn't clear why the child even wants to move in with you who has been a virtual stranger most of his life, other than kids often think the grass is greener elsewhere. If you are going to reintegrate yourself into his life, you really need to get ALL of you into counseling and consult a lawyer.