Yes, false life and Heavy Armor Master work together.
Temporary HPs function exactly as normal HPs, except that they are designed to be lost first, before applying residual damage (if any) to your normal hit points. They are not to be mistaken for damage resistance, which is the ability to halve the damage taken in some situations, or damage reduction, which is the ability to reduce the damage taken by a fixed amount. All of them, however, should stack.
Player's Handbook (p.198)
When you have temporary hit points and take damage, the temporary hit points are lost first, and any leftover damage carries over to your normal hit points. For example, if you have 5 temporary hit points and take 7 damage, you lose the temporary hit points and then
take 2 damage.
If you possess some form of damage reduction, like the Heavy Armor Master feat, or some form of damage resistance, like the rage ability, you apply these effects first, just like you would when receiving damage normally (remember that, as per the rules found on p.197 of the PHB, damage resistance is the last modifier to be applied to damage taken). In effect, temporary HPs are a way to magically augment your ability to take punishment.
Contrast this situation with an abjurer's Arcane Ward. In this ability's description, the ward is described as a separate construct having it's own set of HPs, rather than giving you temporary HPs. As such, one could possess both an Arcane Ward AND temporary HPs (although temporary HPs from different sources still wouldn't stack), but the ward shouldn't, at least according to RAW, benefit from damage reduction or resistance effects. Indeed, it is not you taking the damage, at least until the ward breaks.
From the Player's Basic Rules, page 76:
If you have temporary hit points and receive more of them, you decide whether to keep the ones you have or to gain the new ones.
So in this situation you can choose to have 5 temporary hit points or 10 - it's up to you.
Armor of Agathys specifies that its effect of damaging creatures that attack you happens 'while you have these hit points'. If you replace the hit points it gave you with different hit points, you don't 'have these hit points' any more, you have some other set of hit points, so you wouldn't get the damage effect.
Cases like this are presumably why you get to choose between temporary hit points instead of automatically getting the larger amount.
Best Answer
I would say the Armor of Agathys would still take effect - it's description says if a creature hits you with a melee weapon, not damages you. There are a variety of effects that could mitigate the damage that wouldn't prevent it from being a hit in the first place.
This also makes in-game-world sense; the spell is putting off cold that hurts people from you and your gear; the heavy armor master ability is letting you shrug off attacks that hit your armor, so there's no good simulationist reason the cold shouldn't affect the attacker either.