>How many cards should you be able to trash before it's worth buying/gaining one?
A good basic rule of thumb is at least EE or ECC or CCCC where E=Estate or other junk card that doesn't do anything and C=Copper or other junk card whose value is roughly comparable to Copper. The more other trashing and/or draw you already have (including previous Cemetery purchases), the less inclined you are to trash your Coppers with Cemetery — i.e. if you have 8 cards in your deck, you'd much rather buy a Smithy than replace four Coppers with a Cemetery, because the Smithy helps your tempo but the Cemetery hurts it. On the other hand, if you have extra stop cards in your deck that you wouldn't normally have, that makes you more inclined to trash Coppers. As long as you have two or more Estates, trashing them is basically always better than buying any engine component for $4 unless you have a better way of trashing them coming up really soon, but if your engine is already working smoothly, adding more payload or greening in order to pressure your opponent or to answer your opponent's pressure can situationally be better.
>When do you get it early-game over an engine component?
That's the same question again and I already answered it.
>To what extent should it be considered as a source of Alt-VP when analyzing a board?
To the extent that you think Duchies are going to run out.
>What are some ways to increase your chances of activating your Heirloom, Haunted Mirror?
In most games, you can trash Haunted Mirror as soon as you can regardless of whether you can activate it, because having access to only one copy of Ghost is super disappointing due to the "asymmetry". If you're playing an unreliable, more megaturn-y style engine, that's the main exception to that rule, and the other notable exception is when Exorcist is available, in which case the ways to increase your chances of activating Haunted Mirror are the same as the ways to increase your chances of doing most things in the game: draw and trashing.