S = subject
V = verb
C = complement
Both sentences are grammatical, but none of the ways in which you have underlined the "no matter" component makes any sense.
The part of the sentence following "no matter" is an embedded interrogative clause, whether or not
the is used.
In the embedded interrogative "what the situation is in your life,"
what functions as
subject complement.
In the embedded interrogative "what situation is in your life,"
what functions as a
determiner whose complement is the noun
situation.
Huddleston & Pullum (2002) say, "
[N]o matter is an idiom with the form of an NP which might be regarded as having been reanalyzed as a preposition" (761).
No matter takes embedded interrogative complements, like the compound preposition
regardless of.
You can also use a simple noun phrase after no matter. You could simply say:
I hope that you are happy, no matter your life situation.
Here are two Reed-Kellogg diagrams which illustrate the two sentences that you have produced. Note how
what functions differently in each.
I hope that you are happy no matter what situation is in your life.
I hope that you are happy no matter what the situation is in your life.