A process for upgrading an oil feedstock (102) includes reacting the oil feedstock (102) with a quantity of an alkali metal (106), wherein the reaction produces solid materials and liquid materials. The solid materials are separated from the liquid materials. The solid materials may be washed and heat treated (109) by heating the materials to a temperature above 400 C. The heat treating (109) occurs in an atmosphere that has low oxygen and water content. Once heat treated (109), the solid materials are added to a solution comprising a polar solvent, where sulfide, hydrogen sulfide or polysulfide anions dissolve. The solution comprising polar solvent is then added to an electrolytic cell (120), which during operation, produces alkali metal (106) and sulfur (128).