In the field of fast ignition scheme, self-generated magnetic fields via beam resistive filamentation have a significant role in the angular divergence of the relativistic electron beam, which can be affected by the intensity of other self-generated magnetic fields. In this context, the effects of pressure gradient sources arising from temperature and density gradient of the pellet along the beam flow direction are investigated. The results showed that the resistive filamentation instability can be strongly amplified compared to the fully homogeneous plasma. In this respect, for the distance away from the critical surface, the instability is protected for a longer wave number. Also, the beam and plasma properties such as the beam relativistic factor, the beam number density, and the degree of the plasma temperature anisotropy might be effective.