I'm sorry this happened to you, and that you're feeling this way.
See a medical professional and tell them what happened, and what your concerns are about brain damage. Be honest about how you use opiates, or any other drugs you use or are prescribed, and your medical history. You will not get into any legal trouble. Good luck.