U.S. stocks closed mildly lower as stocks struggled to hold gains from higher oil prices, amid investor focus on earnings.