The sentence written in a formal style is: "To increase your endorphins, hit the gym to pump iron and do a strenuous workout." However, it could still be improved for formality. For an even more formal version, it could be rewritten as: "To increase endorphin levels, one should engage in rigorous physical exercise."
The first option is less formal due to the informal phrases like "super important."