In this paper game theory is exploited to derive an optimal solution to the problem of cooperative data transmission based on distributed selection diversity in an ad hoc wireless network consisting of selfish nodes. First, a credit-based micro-economical model is proposed to manage node interaction; then, a transmission strategy maximizing node utility is derived. In the proposed strategy each node decides, in an autonomous fashion, whether and when transmitting data packets over a shared wireless channel. Numerical results evidence that this approach can ensure both fairness in the access to a shared medium and excellent network efficiency. In particular, it offers an higher throughput level than other communication protocols implementing selection diversity in distributed multi-antenna systems.