How can I mount an electrical box in a drywall hole that's too large?
I assume you used this box to avoid tearing up a bunch of drywall. So let’s try for a solution that avoids that. 

Mount a piece of wood inside the wall along the edge of the opening and mount to this piece of wood. 

The wood must be small enough to fit inside the existing hole. Once in you rotate it into place and then mount with drywall screws going through drywall and into the wood. If this area is exposed wall (not covered by a picture, a TV, or other furniture) you will want to patch the screw heads.

Mounting to the wood may require some more DIY finesse. With so little room to work you may find you need to modify the clip attachment and find some other means to attach on that side of the box. Like maybe snip off the clamp part so the hinged piece sits flat agains the wood and then drive a screw in horizontally.

HOWEVER, by the looks of things this is a box intended for main electrics? If there are high voltage (>50V) connections in this box it is a code violation to modify it. In particular, it may no longer be fire resistant after modification.