In this paper we consider a heterogeneous network which consists of a macro base station and some pico base stations utilizing massive MIMO and MIMO techniques, respectively. A central software-defined mobile network (SDMN) controller is adopted in order to provide user association and energy scheduling. The users are considered battery limited and are capable of simultaneous wireless information and power transfer (SWIPT) in order to harvest energy and address the energy shortage issue. These users harvest energy from the received signals in the downlink and consume it via their uplink communications. This paper deals with the downlink user association by jointly optimizing the overall sum-rate of the network and the harvested energy by introducing an appropriate utility function. In this regard, the optimum user association and power splitting factor for each user are calculated via the downlink optimization stage. Then, the process of uplink scheduling is defined as choosing the best users in each time epoch to transfer data as well as optimizing their transmit power by solving Lyapunov drift-plus-penalty function. Simulation results are provided in order to confirm the optimality of the proposed algorithm in comparison with the previous user association and uplink scheduling approaches in terms of providing fairness and battery management among users.