The maximal amount you can claim back is:
(US-Dividends - (US-Assets/Total-Assets) * Debt Interest) * Marginal Tax rate
So for someone who has a home worth 1M with a 700k mortgage at 1%, 400k in US-Assets that had a Dividend of 7k and a marginal tax rate of 25%:
(7k - (400k/1400k) * 7k) * 25% = 1.25k
This is higher than the 7k *15% = 1.05k that is withheld, so the full amount is claimable.