Abstract : We optimize the density dependence of a local energy density functional for pairing correlations (pair-DF), taking into account both the isoscalar and the isovector densities. All the experimental pairing gaps in even-even nuclei with N,Z>8 are analyzed by performing the Hartree-Fock-Bogoliubov calculation. The new pairing energy density functionals give the best fit for all the pairing gaps with the rms deviation of σtot=(260-360) keV, depending on adopted Skyrme interactions in the particle-hole channel. It is shown that the isoscalar-density dependence in the pair-DF can be determined almost uniquely for the several Skyrme forces by adjusting the neutron and proton pairing gaps. An empirical relation among the parameters in the isoscalar part of pair-DF is extracted. The uncertainty of the isovector part is also examined by calculating the pairing gaps of neutron-rich and proton-rich nuclei in a wider region of the nuclear chart. We point out also that the linear isovector-density dependence in the pair-DF can mimic well the Coulomb effect for pairing correlations in neutron-rich nuclei. We discuss finally the predictive power of the pair-DF for pairing properties around drip-line regions.