Oh I have been there. I would really hold as if crushing the two front legs very firmly under arm. You really need a partner then to force the jaws open at the hinge and tip back the cat's mouth/head.
Alternatively get really fresh choice single tiny chunk of food and extremely hungry cat; hide pill in food and cover in cream...
Or crush the pill in extremely gravied morsel
It is very difficult.