You can’t properly, or lawfully (spiritually speaking), hold marriage or other forms of committed long-term spousal relationship responsible for your happiness. In other words, marriage and commitment will not make you happy or keep you happy.
People who are happy within themselves
They like themselves, they are reasonably at peace with the quality of their life, generally are willing and able to do the kind of inner work and manage their outer behaviors in a way that their relationships also work (unless their partner is quite immature in this respect, in other words both have to do this not just one).
People who look to their partner (or their relationship with their partner) to make them happy, or to make them complete, or to make their life work, generally fail in relationships, because that is not how relationships really work. In fact relationships don’t work, people who are mature in relationship skills, make the relationship successful because they work hard to make it successful. The relationship doesn’t do it for them, they do it for the relationship and for themselves.
If happiness is made to be conditional upon the circumstances of a life, that happiness is ephemeral (short lived) indeed, as circumstances change constantly and we have little or no control over most of those circumstances. On the other hand, happiness that is cultivated within oneself as a state of consciousness and being endures in spite of any circumstances we become involved with. This kind of happiness (a deep spiritual happiness) is not an outcome of circumstances, but rather is independent of them.
In short, unhappy people are likely to have unhappy marriages, while happy people are likely to have happy marriages.
That being said, there is of course the need for partners in relationship to learn the skills necessary to make relationship work. Few seem willing to undertake such learning, preferring to blame their partners when things go wrong, and they simply move on to «greener pastures.» Of course this strategy does not work because wherever you go, there you are, and there you are with all the same problems and hang-ups you had in the previous relationship.
Good relationships are not the answer to your problems, they are rather the natural outcome when two people have both done the inner work of becoming fit for relationship. In other words, they have undertaking a learning journey to learn how to create love for a lifetime together. Any fool can and does fall in love, but only a few bother to learn how to create love, how to be mature in relationship, based upon love, kindness, compassion, generosity, sacred sexuality and spiritual practice.