Necessary and sufficient conditions for bipartite entanglement are derived, which apply to arbitrary Hilbert spaces. Motivated by the concept of witnesses, optimized entanglement inequalities are formulated solely in terms of arbitrary Hermitian operators, which makes them useful for applications in experiments. The needed optimization procedure is based on a separability eigenvalue problem, whose analytical solutions are derived for a special class of projection operators. For general Hermitian operators, a numerical implementation of entanglement tests is proposed. It is also shown how to identify bound entangled states with positive partial transposition.