Struggling mortgage provider Countrywide Financial Corp. has been acquired by Bank of America in a deal worth $4 billion. The buy out of Calabasas-based Countrywide makes Bank of America the nation’s largest mortgage lender and loan servicer. The action also brings to a close the nearly year-long struggles of Countrywide, one of many mortgage providers rocked by the sub-prime lending crisis that has resulted in layoffs of employees and foreclosures on homes of borrowers. Countrywide Chairman and CEO Angelo R. Mozilo called the acquisition the right move on the part of the company, its employees and shareholders. Countrywide operates more than 1,000 field offices and has a sales force of nearly 15,000.