Regeneration of adsorbents in processes other than pressure or temperature swing adsorption by heating by using electrical resistance heating