Do horcrux effects come into play before or after abilities?
From my previous answer regarding the situation, I don't think you can avoid the stun by gaining the heart. As soon as you play an ally the horcrux would trigger, causing the stun to happen and stunning states:


  You cannot lose (or gain) [heath] any more this turn.


Then the card effects would happen. Here's a BoardGameGeek thread discussing this exact situation:

https://boardgamegeek.com/thread/1677572/diary-affect-timing