By using the additive and multiplicative separation of variables we find some classes of solutions of the Laplace equation for a generalization of the Poincaré upper half plane metric. Non-constant totally geodesic functions implies the flat metric and several examples are studied including the Hamilton's cigar Ricci soliton. The Bochner formula is discussed for our generalized Poincaré metric and for its important particular cases.