Mean-field approximation in gene regulation and evolutionary games