Heart burn meds are often Mg Oxide or sulfate, which isn't that well absorbed. [1,2] for anxiety and depression, Mg Citrate works well, as does Mg Glycinate [3]
Just a heads up.
[1]http://www.kumc.edu/school-of-medicine/family-medicine/integ...
[2]https://www.ncbi.nlm.nih.gov/m/pubmed/2407766/
[3] https://www.psychologytoday.com/us/blog/evolutionary-psychia...