Here is something useful for anyone, not just people who are having pain and spasms.
With your left hand fret some note, say the C on the A string. Start picking quarter notes or eight notes, and play as you normally would, pedaling on that note. Slowly release tension with your fretting hand while you keep picking. Eventually the tension is too low and you start getting fret buzz. Then add back the least tension you can to make it stop buzzing. That is now your goal. Any grip strength above that is simply wasted effort.
Do it with different fingers in different places, just playing one note for 30 seconds or whatever. Don't spend more than 5 or 10 minutes on it.
Tomorrow do it again, but after a little bit of that single note stuff, play a simple scale up and down while again using minimum tension. If you don't sometimes get fret buzz, you are proably still using too much tension. Again, you don't have to kill yourself doing it for an hour. Just 5 or 10 minutes. Make it a daily routine just to remind your muscle memory to stop using a death grip.