You dear person. You are trying so hard to be good that you are making yourself feel very bad. I’m not a pastor, but I do know this. You are treating god as though he is human – and not a very nice human at that. The god of Christianity is not a vengeful god who makes people miserable because he is mad at them. The father of Jesus is a god who forgives and loves and tries to help people also be forgiving and loving. I sincerely doubt that your physical suffering has anything to do with your spiritual relationship with god. Embrace the comfort that a relationship with a loving god can give you. Turn to your physicians and mental health professionals to help you in the physical world.
You say that your medications aren’t working. The best treatment for what you are describing is a combination of medication and talk therapy. Make sure that your therapist and your prescriber are in regular contact. Your therapist can give your prescriber information he or she needs to adjust your medications. Do spend at least part of your therapy time working on refining your coping skills so you have more tools for taming your anxiety. Please also stay in touch with your pastor and allow yourself the comfort of prayer.
I wish you well.