Nucleon-nucleus optical potential in the particle-hole approach