The metaphorical usage of unpack to unload emotions is quite old, certainly older than modern psychology or the phrase emotional baggage. The specific application to analysis emerges no later than the early 20th century.
The Oxford English Dictionary, "unpack, v.", has a few relevant entries that help approximate when unpack attains these figurative meanings. The first, def. 2.a., involves confiding one's emotions:
transitive. figurative and in figurative contexts, esp. with reference to the releasing of one's emotions. Also reflexive: to unburden oneself emotionally.
1604 W. Shakespeare Hamlet ii. ii. 588 This is most braue, That I..Must like a whore vnpacke my hart with words. [Note: this is the only use of unpack in the Shakespeare corpus, based on an Open Source Shakespeare search.]
1655 T. Harvey tr. G. B. Spagnoli Bucolicks ii. 11 Men do the like; each doth himself unpack, And casts the burthen on anothers back.
2001 Community Care 13 Dec. 88/2 (advt.) Techniques such as play therapy, art and drama are used to help the child ‘unpack the suitcase’ of emotional baggage.
So the idea here is not necessarily analysis but rather confiding in another. If the emotions are packed in, telling them in words unpacks them. I can find examples of this word then being used to pertain to other sorts of telling or disclosing, as this preface to A Third Defence of the Cause of Peace (Richard Baxter, 1681) does in response to a "Mr. Cheney":
His Book consisteth partly of a handsome considera∣ble discourse for Prelacie, and other Church-Offi∣ces of Humane Invention; and partly of a new & singular Doctrine about Church-Forms; & part∣ly in a critical discharge of his fancy, and unpack∣ing his preparations against the Independant Co∣venant, and Church-Form;
The critical discharge of his fancy relates to Mr. Cheney's imagination being fired off. Baxter switches metaphors to then describe unpacking his preparations, or disclosing his plans or acts.
A later usage from Arthur Murphy's play Know Your Own Mind (1778) involves conveying what other people have said:
Sir Harry: By the shade of Rablais, he is the most entertaining creature! He has played off such a firework of wit. I'll tell you what he said this moment.
Byg: No, Sir, no; if you are a pedlar in smart sayings and brisk repartees, we don't desire you unpack for us.
A more analytical usage emerges in the 20th century, documented in def. 2.c.:
transitive. Originally Philosophy. To analyse (an issue or concept) in great detail, typically with the aim of uncovering its underlying assumptions or hidden implications. Later more generally: to analyse (a work, etc.) in order to interpret or understand it.
1906 G. S. Fullerton Introd. Philos. xii. 179 Thus, when we say: Man is a rational animal, we may merely be defining the word ‘man’—unpacking it, so to speak.
1953 R. J. Spilsbury in Mind 62 353 The meaning of such statements can be unpacked in a series of hypothetical propositions.
So to unpack in these contexts is no longer mere telling but analysis: to discover the underlying assumptions and implications of something. Modern figurative usage can involve disclosure, analysis, or possibly both.