If you need the mental health counseling and it's deemed medically necessary and the counselor accepts Medicare then yes Medicare will pay for mental health counseling when it's deemed necessary.
Medicare will pay for A licensed psychiatrist, clinical psychologist or other licensed mental health counselor if you require it.
Medicaid however will not pay for marital counseling or other therapy that is not medically necessary.