I agree with the others who posted about how to avoid this sort of thing in the first plce... in addition to that you (and anyone in your situation) might want to think about:
1) Be very carful about practice for a while... I know it's not as much fun as going all-out but if you make clear to your sensei and others that you need to take care of your body they'll usually understand.
2) See a good physical therapist (or any of a whole range of practitioners who take care of things like this...) and put some work into making it better.
If you have done the above already I'm sorry for being preachy but I've found that even though I usually know when I need to chill and take care of myself, it's hard to listen to one's own advice.