Eichler–Shimura theory for mock modular forms