Jung postulated four functions: two rational ones (thinking and feeling) and two irrational ones (intuition and sensation). On the surface an unlearned layman might wonder if he got them from Blake, whom he tells us that he had read extensively and admired. The Four Zoas bear a close resemblance to Jung's Four Functions. But the problem of the origin or source is more complex.
Both had access to much earlier sources and gathered them into their own understanding: Jung's psychology and Blake's poetic myth.
You may find much information about the functions in the Cube of Space.
Cornerstones of the Psyche treat fourness in a more comprehensive way.
Classical Elements shows this figure going back to the 18th century B.C.
The Bible spoke of the four living creatures: Ezekiel 1 and Revelation 4 and 5. I found 50 uses of four in Ezekiel, 13 in the first chapter.
Earth, Water, Air and Fire had various understanding during the past 38 centuries. These four elements are closely associated with Blake's four zoas: Urthona (Los in mortality) to Earth, Tharmas to Water, Urizen to Air, and Luvah to Fire.
You will find more discussion of the four Zoas in my Blake Primer. (In the Provisional Table of Contents click on Characters.)
The Four Zoas of course are central to Blake's myth and psychology. They apply equally to human beings and to the world, but much less so to the cosmos, which for Blake was unitary.