Search for a Higgs boson decaying into two photons in the CMS detector