Recently, the slime mould algorithm (SMA) has become popular in function optimization due to its simple structure and excellent optimization capability. However, it suffers from the shortcomings of easily falling into local optimum and unbalance exploration and exploitation. To address above limitations, an enhanced fitness-distance balance SMA (EFDB-SMA) is proposed in this paper. Firstly, fitness-distance balance (FDB) is an effective method to identify candidate solutions from the population with the highest potential to guide the search process. The FDB score is calculated from the fitness value of the candidate solution and the distance to the current optimal solution. In order to trade off exploration and exploitation, a candidate solution with high potential, which is selected based on FDB score through the roulette wheel method, is used to replace random choosing individual in position update mechanism. Secondly, an elite opposition-based learning strategy is adopted in the population initialization for increasing population diversity. Then chaotic tent sequence, with traversal property, is integrated into the position updating of SMA to perturb the position and jump out of local optima. Finally, EFDB-SMA greedily selects the position with superior fitness values during search process instead of indiscriminately accepting position updates to improve search performance. The experimental results on CEC2020 functions indicate that the proposed algorithm outperforms other optimizers in terms of accuracy, convergence speed and stability. Furthermore, classic datasets were tested to demonstrate practical engineering value of EFDB-SMA in spatial search and feature selection.