The S&P 500 ended down almost 5% after U.S. President Donald Trump’s sweeping tariffs ignited fears of an all-out trade war and a global economic recession.