WASHINGTON — The New York Times will express regret for hurting the feelings of the family of a Texas soldier after publishing a photograph and a video showing him as he lay dying in Baghdad. The letter is part of an agreement reached Wednesday between the Army and the Times to resolve a controversy about the use of images of Staff Sgt. Hector Leija without his consent.