We prove a general theorem on the existence of heteroclinic orbits in Hilbert spaces, and present a method to reduce the solutions of some P.D.E. problems to such orbits. In our first application, we give a new proof in a slightly more general setting of the heteroclinic double layers (initially constructed by Schatzman [20]), since this result is particularly relevant for phase transition systems. In our second application, we obtain a solution of a fouth order P.D.E. satisfying similar boundary conditions.