Kelsea Ballerini's divorce was "gnarly" and writing music helped her work through her "complex human feelings" about the end of her marriage.