The three-dimensional potential flow problems are solved by a boundary integral equation in this article. The boundary integral equation is regularized by a subtracting and adding-back technique in global elements. This technique utilizes several identities to eliminate the singularities or near singularities of surface integrals. In test cases, the convergence speed of this method for a smooth body is of the order N−3 in one direction no matter how high-order quadrature is applied. For nearly singular integrals, several extremely oblate spheroids are tested to verify this method. These results illustrate that this method can effectively improve the nearly singular deficit when it exists. For the non-smooth bodies, the present method is applied to solve the mixed boundary value problems inside two kinds of vessels, which are sloshing motions. At last, some tests are compared between the boundary element methods (local elements) and the present method (global elements).