HSBC said on Tuesday it has agreed to sell its retail banking operations in Bahrain amid a wider restructuring at the bank.