You cannot escape or use items during the Dialga boss battle in Pokémon Pearl. The encounter is mandatory.