Ultra-dense heterogeneous networks (HetNets) are deployment scenarios in the advent of fifth generation (5G) and beyond network generations. A massive number of small base stations (SBSs) and connected devices have been exponentially increasing. This has subsequently led to a rise of several mobility management issues which require optimization techniques to avoid performance degradation. Machine learning (ML) is a promising approach for future mobile communication networks (5G and beyond). It has the ability of improving the efficiency of complicated heterogeneous and decentralized networks. ML has proven to be significant in the mobility management field since it optimizes handover control parameters (HCPs) over various dynamic environments. To the best of the authors' knowledge, no comprehensive survey deeply discussing a state-of-the-art ML algorithms in mobility robustness optimization (MRO) functions. However, each summarized algorithm in this study includes deployment scenario, ML type, methodology used, criteria, HCPs, key performance indicators (KPIs), simulators, and achievements which can assist researchers for future investigations in MRO functions. In addition, this study serves as a guide in the selection of proper optimization algorithms according to the outcomes of each algorithm. Furthermore, this study presented the common types of ML and the techniques used from each type to optimize the HCPs of the MRO functions. Moreover, high-mobility-aware and network topologies are presented in MRO function for further system enhancements. Besides, the survey further highlights several potential problems for upcoming research and provides future directions to address the issues of next generation wireless networks.