Man cries in court as he's sentenced to life for murder