A man was fatally shot Thursday after holding his ex-girlfriend hostage outside an Office Depot in Redlands for nearly two hours, officials said.