If I die, can I guarantee that my heart will be used for donation?

No. You can make it known to your family or in a will that you want to be an organ donor. You can check the box on your official driver's license in most states. However, the decision to remove you heart for transplant can only be made at the time of your death. There are numerous medical considerations that come into play, that would only be known at that time.
No. There are no guarantees (in life or in death). To improve your chances of becoming a donor after you die, you should sign up as an organ donor when you renew your driver's license and let your family know your wishes.