I think youd want to look at the "regress problem of justification" and solutions to it. I am reading Michael Huemer's Knowledge, Reality and Virtue and I haven't gotten to it yet but it covers the topic. Its an intro book Im enjoying so far.
Also analytic truths arent the same as necessary truths. Analytic truths are true by virtue of the meaning of their words (e.g "all bachelors are single"), there is no need to prove them.
Using god's commands as grounding for justifying morals doesnt work because there is a modified version of euthyphyro's dilemma that shows the issue: you can just ask what justification god has for giving particular moral commands. If he has some justification, we are not using god as the grounding. If he doesnt, it is arbitrary, makes the moral commands void of moral authority and renders god imperfect.