Suicidal man detained without incident at Carlsbad residence