The תניא מבואר compiled by Rabbi Avraham Alashvili quotes the Lubavitcher Rebbe as sourcing the statement in Tanya as follows:
ראה ע"ח ש"נ פ"ד. ר"ח שער היראה פ"ג. ומקורו בזהר ח"ב קז, ב. וראה גם במדב"ר ספכ"ב.
Zohar, part 2 107b says:
אמר דוד בלבא אית תרין היכלין בחד דמא ובחד רוחא ההוא חד דמלייא דמא ביה דיורא ליצר הרע ולבי לאו הכי דהא ריקן איהו ולא יהבית דיורא לדמא בישא לשכנא ביה יצר הרע ולבי ודא חלל איהו, בלא דיורא (דמא) בישא
Dovid Hamelech said in the heart there are to chambers, in one blood, in the other air. In the one that is filled with blood the Yetzer HaRah dwells, but my heart is not that way because it is empty and does not give a place for bad blood for the Yeitzer HaRah to dwell, and my heart is certainly empty without a bad dwelling (or blood).
Eitz Chaim Shaar Nun says:
ובזה תבין ענין לב חכם לימינו ולב כסיל לשמאלו כי הלב יש לו ב' חללים ומן א' מהם יוצא רוח החיות של האדם והב' הוא מלוכלך בדם וגם הוא מתפשט בכל הגוף ומלאך היצה"ט מתלבש בחלל ימין ומשם מתפשט בכל הגוף בפנים מלאך היצה"ר הבא מגבורות בחלל השמאל ומשם מתפשט לכל הגוף
With this you will understand the idea of "The heart of the wise is to his right and the heart of the fool is to his left" because the heart has two chambers and from one of them comes the spirit of life of the person and the second is dirty with blood and it also spreads into the whole body and the angle of the Yeitzer Tove is enclothed in the right chamber and from there spreads to the whole body inside the angel of the Yeitzer Harah which comes from the severities in the left chamber and from there spreads to the whole body
Reishis Chochma says:
והיינו שפי' רז"ל שיש בלב שני חללים הא' מלא דם והוא משכן ליצה"ר והב' חלל בלא דם משכן ליצה"ט
This is what the Razal explain that the heart has two chambers, one filled with blood which is the dwelling place of the Yeitzer Harah, and the second chamber without blood, the dwelling place of the Yeitzer Tov.
Bamidbar Rabbah says:
זש"ה (קהלת י) לב חכם לימינו ולב כסיל לשמאלו לב חכם לימינו זה יצ"ט שהוא נתון בימינו ולב כסיל לשמאלו זה יצה"ר שנתון בשמאלו
This is what the verse says (Koheles 10:2) The heart of the wise man is at his right, whereas the heart of the fool is at his left - the heart of the wise man is to the right - this is the good inclination, which is placed on his right - the heard of the fool is to his left - this is the evil inclination which is placed on his left.
As for the association with the verse כי הדם הוא הנפש, see Eitz Chaim Shaar 39:
דם שהוא הנפש הנקרא דם כמ"ש כי הדם הוא הנפש ושיעורו הוא רביעית
The blood which is the soul, which is called blood, as it says כי הדם הוא הנפש and its measure is a Reviis.
In the תניא מבואר mentioned above it quotes the Lubavitcher Rebbe as making the association that the blood in the heart is the Reviis Dam that the soul depends on. If that is the case then we can understand the source for associating this verse specifically with the concept of the Nefesh HaBehamis being in the left side of the heart.
Regarding the Nefesh HaChaim, the concept of the Nefesh in the liver is brought in the עמק המלך in the name of the "philosophers", which is a reference to Rishonim who don't follow Kabbalah in their writings (AFAIK) - probably a reference to the Ibn Ezra (משפטים כג, כה).
The עמק המלך writes:
ועל זה אמרו הפילוסופים נפש בכבד רוח בלב נשמ' במוח ורמזו לזה נפש שהיא נוקבה מגעת עד טרפשא דזעיר שהוא רוח ורוח שהוא זעיר בלב ר"ל מגיע עד לבא דאמא ונשמה שהיא אימא במוח ר"ל מגעת לאבא עד מוחא.
I'm going to demur from attempting to translate that literally. But the idea is that philosophers says the nefesh is in the liver, which hints to the idea that the Nefesh is Malchus, whereas Ruach is the six emotional attributes and thus the heart, and Neshama is Binah (intellectual).
The Eitz Chaim Shaar Mem seems to be a primary source:
כי אנו רואין שוורידי הכבד משתלחין ומסתעפין בכל האיברים שהם ג' בחי' הכלים הנ"ל וורידי הכבד נכנסים בהם להחיותן והם עומדים בחיצוניות האיברים ומכניסין בהם דם הכבד שבו מתלבשת הנפש כמ"ש כי הדם הוא הנפש
... the veins from the liver enter them (the limbs) to enlivent them and they stand on the outside of the limbs and bring the blood of the liver, which in it is enclothed the sould, as it says "כי הדם הוא הנפש".
Interestingly the Mitteler Rebbe of Lubavitch brings the idea of the Nefesh in the liver from the Zohar. Apparently this isn't in the standard version - as the footnotes there don't find it, but rather source it to the Tikkunei Zohar, but he was a contemporary to the author of the Nefesh HaChaim, so perhaps he had the same version.
The Tikkunei Zohar however, places the Nefesh in the 248 limbs, not the liver specifically, but given the quote from the Eitz Chaim Shaar Mem it could be seen as a consistent point.
So it seems that the extant source for the Nefesh HaChaim is the עמק המלך and the Eitz Chaim. The Eitz Chaim could be seen as in line with the Tikkunei Zohar.