It does sound like a strain/grade 1 tear which can happen during cramping due to the prolonged involuntary contraction.
It will take some time to heal just like any other pulled muscle. However, I would use ice and not heat. Heat is only good for tight, knotted muscles and will actually aggravate further inflammation at this stage.
Keep RICEing it as often as you can and very gently stretching it daily until you can confidently bear weight, then its important to slowly incorporate a gradual return to play since the muscle will still be weakened and prone to reinjury. From what it sounds like, you are probably looking at another 2-3 weeks recovery before returning to play and probably another 1-2 weeks on top of that before you're at 100% strength. It will take a bit longer if its a grade 2 tear but the treatment is still the same
If you saw a physiotherapist, he/she would help you reach these goals in stages within the above timeframe:
1) control acute inflammation and allow muscle to heal (RICE)
2) bear weight and go for a light walk
4) go for a light jog
5) go for a longer jog
6) include springs in your jog: sprint (10 secs), jog (30 secs), sprint, jog, etc
7) light hitting on the court & serving practice (1hr max)
heavier hitting, point play practice (1.5 hrs)
9) practice sets
10) return to competition
If anything is painful, go back to the previous stage. The danger is pushing yourself further until you feel pain, which means you've reinjured the muscle and will set you back longer.
As for ibuprofen, there is some conflicting evidence that ibuprofen increases healing time so I'd only take it if you need it for pain control to work or go about your business.
You can workout your upper body meanwhile but be weary that your shoulder might still be tender.
Hope this helps.