“So grateful for my time @MadamSecretary - a wonderful show where I love the cast, crew, background artists,” the actress tweeted in announcing her departure.