British Airways is neither buying nor merging with Aer Lingus.
British Airways' parent holding company (a Spanish company called International Consolidated Airlines Group S.A. or IAG) has bought and delisted Aer Lingus. IAG already owns two other airlines (Iberia and Vueling) and is in the market for more, although this latest acquisition is going to take a lot of management time.
Your existing contractual arrangements with United and Aer Lingus will not be affected.
Ultimately, and subject to regulatory approval, IAG will be ending Aer Lingus's association with United and bringing it into their transatlantic joint business venture, which is a kind of cartel with American Airlines, British Airways, Iberia and Finnair, who coordinate prices and schedules on services between Europe and North America, and share their revenue. This will take at least a year because of major IT deficiencies at Aer Lingus and the complexity of the legal landscape. The Aer Lingus brand will be retained, indeed the plan is for a major expansion with Dublin being turned into a major transatlantic hub. Aer Lingus is not being subsumed by British Airways (nor by either of the other IAG-owned airlines).
However, to reiterate, although those codeshares on United will eventually disappear, this will not affect any existing tickets, save perhaps for making involuntary changes (where if anything you will have more options rather than fewer).