Is there a Christian denomination that holds only the Son and the Father as persons of God? (Only two persons) -- as opposed to Trinitarianism and Unitarianism. Has it been upheld by anyone in Christian history?
The term you should look for is "binitarianism".
Binitarianism - Wikipedia needs improvement, but it's a good start in your research:
Binitarianism is a Christian theology of two persons, personas, or aspects in one substance/Divinity (or God). Classically, binitarianism is understood as a form of monotheism—that is, that God is absolutely one being—and yet with binitarianism there is a "twoness" in God, which means one God family. The other common forms of monotheism are "unitarianism", a belief in one God with one person, and "trinitarianism", a belief in one God with three persons.
Here is an extract from a specific example of one denomination's teaching:
Notice this admission in the New Bible Dictionary:
"The term 'Trinity' is not itself found in the Bible. It was first used by Tertullian [one of the early Catholic church theologians] at the close of the 2nd century, but received wide currency and formal elucidation only in the 4th and 5th centuries" (1996, "Trinity").
The same dictionary explains that:
"the formal doctrine of the Trinity was the result of several inadequate attempts to explain who and what the Christian God really is... To deal with these problems the Church Fathers met in 325 at the Council of Nicaea to set out an orthodox biblical definition concerning the divine identity." However, it wasn't until 381, "at the Council of Constantinople, [that] the divinity of the Spirit was affirmed."
Another theological source admits that there was "an impression of binitarianism [that is, two in unity, the Father and Son] given by much second- and third-century thought ... Pluralist thinkers ... maintained the full co-presence of the two (later three) distinct entities within the Godhead" (Alan Richardson, editor, A Dictionary of Christian Theology, 1969, p. 345).
Indeed, the second-century bishop Irenaeus, an earlier church father, stated unequivocally, "There is none other called God by the Scriptures except the Father of all, and the Son, and those who possess the adoption [i.e., sonship as God's children]" (Against Heresies, Book 4, preface; compare Book 3, chap. 6). We find no mention here of the Holy Spirit being a third person as God. Rather, the concept here is that of human beings becoming part of the family now consisting of God the Father and God the Son.
We see, then, that the doctrine of the Trinity wasn't formalized until long after the Bible was completed and the apostles were long dead in their graves. It took later theologians several centuries to sort out what they believed concerning the Holy Spirit. Regrettably, the Trinity doctrine has been a major barrier to clear comprehension of the biblical truth that God is a divine family.
This teaching originated with the Worldwide Church of God (Herbert W. Armstrong). The first article of faith from their official website said that “God is the eternal, all-powerful, supreme creator and sustainer of the entire universe. God is one, composed of spirit and comprising a family presently consisting of God the Father and Jesus Christ the Son.” Jesus Christ is “the second member of the God family”.
After the death of Hebert W. Armstrong, the Worldwide Church of God began to embrace a more orthodox understanding of the Christian faith. Armstrong’s successors, Joseph Tkach, Sr., and Joseph Tkach, Jr., have led the Worldwide Church of God in a more orthodox direction, rejecting British Israelism, accepting the Trinity, etc. The organization/denomination now refers to itself as Grace Communion International. A brief history of the transition from Armstrongism to Grace Communion can be found at www.gci.org/aboutus/history
Since the Worldwide Church of God split (mainly over the issue of the Trinity), other branches arose. One is the Church of God Worldwide Association. Their first article of faith says this:
God is an eternal family currently consisting of the Father and the Son. Both the Father and Son are involved in the creative work of expanding this family by bringing many children (sons and daughters) to glory. The Holy Spirit is the power of God and the Spirit of life eternal, not a separate entity or being. https://cogwa.org/about/fundamental-beliefs/#1
Next, we come to the Continuing Church of God, which says this in its official website:
In the 20th century, the Philadelphia era of the true Church (Revelation 3:7-13) was raised up. This “era” was primarily represented by the old Radio Church of God which was renamed the Worldwide Church of God under the leadership of the late Herbert W. Armstrong. While that “era” apparently ended upon his death, a faithful Philadelphia remnant exists that now carries that mantle and pillar of truth and will exist until the end of the church age. The Continuing Church of God, with its world headquarters in the Five Cities region of California (specifically now, the City of Arroyo Grande), tries to feed the flock around the world in the 21st century.
THE GODHEAD: The Father and Son comprise the Godhead and work through the Holy Spirit. Scripture shows that God is one eternal divine Family consisting of two, God the Father and the Word, at this time, with faithful children to be added to become as Jesus Christ, who is God. The Holy Spirit is not a separate being in the theological sense and is given to those after those who have properly repented and been baptized. The early original Christians had what has been called a “binitarian” view of the Godhead. Source: https://www.ccog.org/statement-of-beliefs-of-the-continuing-church-of-god/
As you can see, there is more than one church that believes the Godhead consists only of the Father and the Son and that the Holy Spirit is God’s power or energy but “is not a separate entity or being”. The ones I’ve mentioned have articles of faith almost identical to that of the original Worldwide Church of God. Ray Butterworth has already posted an answer about the United Church of God.