Brazil's Foreign Minister has resigned from his post, citing health problems and upcoming medical treatments as the main reasons.