1) see a doctor to be certain there is no damage
2) massage -- deep -- just feels good and will loosen up the muscle and break up scar tissue
3) Stretch your quads/hip flexors.
Ease up on your hammies for now and them heal.
Sounds like your quads and hip flexors might also be too tight and constantly pulling your hammies which is exasserbated when you stretch your already stretching hammies. I had this problem myself for two years. I stretched my quads and hip flexors, finally, and went light on the hammies and it all healed. I haven't had that problem since.
Surrender yourself to nature and be all that you are.