You would need a box big enough to handle 29.75 cu. in. capacity. A 4″ sq X 21/8″ deep box is rated for 30.3 cu. in’s. This is the minimum size box required and is based on there not being any clamps inside of the box. My recommendation would be to go to a 411/16 X 21/8″ deep box and raised cover to allow for the size of the GFI. You won’t have to cram. The fill is based on the following:

9 #12 wires x 2.25 cu. in. each

2 #10 wires x 2.50 cu. in. each

1 GFI Receptacle = 2 #12 or 2 x 2.25

1 20A switch = 2 #12 or 2 x 2.25

The ground wire is only counted once but you must keep in mind the room the others take up. (hence the 411/16″ box. This will give you a nice clean installation. And if this is all on a 20 Amp breaker you must replace the #14 ground with a number 12.