A general technique for approximating high-dimensional empirical kernel matrices