  We prove two compactness results for function spaces with finite Dirichlet
energy of half-space nonlocal gradients. In each of these results, we provide
sufficient conditions on a sequence of kernel functions that guarantee the
asymptotic compact embedding of the associated nonlocal function spaces into
the class of square-integrable functions. Moreover, we will demonstrate that
the sequence of nonlocal function spaces converges in an appropriate sense to a
limiting function space. As an application, we prove uniform Poincar\'e-type
inequalities for sequence of half-space gradient operators. We also apply the
compactness result to demonstrate the convergence of appropriately
parameterized nonlocal heterogeneous anisotropic diffusion problems. We will
construct asymptotically compatible schemes for these type of problems. Another
application concerns the convergence and robust discretization of a nonlocal
optimal control problem.
