Multiple-input multiple-output (MIMO) technology is known to improve energy efficiency in energy-constrained wireless networks, such as wireless sensor networks (WSN). Although in WSNs, a node is often equipped with a single antenna, nodes can be clustered into virtual antenna arrays that can act as virtual MIMO (VMIMO) nodes. In this paper, we propose a distributed cooperative clustering protocol (CCP) that aims at conserving energy and prolonging network lifetime by taking advantage of VMIMO communications. In contrast to previously proposed protocols, CCP fully exploits the diversity gain of the VMIMO technique by optimally selecting the cooperating nodes (CNs) within a cluster and balancing their energy consumption. We first formulate the problem of optimal CN selection at the transmit and receive clusters as a nonlinear binary program, and show the problem is NP-hard. Aiming at minimizing the imbalance in the residual energy at various nodes, we reduce the problem into two sub-problems: finding the optimal number of CNs (ONC) in a cluster and the CN assignment problem. To analytically address the ONC problem, we analyze the energy efficiency of two existing VMIMO methods: distributed Space Time Block Code (DSTBC) and distributed Vertical-Bell Laboratories-Layered-Space-Time (DVBLAST). The second sub-problem is addressed by assigning CNs to nodes with stronger residual energy. To make CCP scalable to large WSNs, we propose a multi-hop energy-balanced routing mechanism for clustered WSNs with a novel cost metric. Our routing method is also applicable to other clustering protocols (e.g., CMIMO, MIMO-LEACH). Extensive simulations are used to validate our analysis.