Are the Gospels considered anonymous by historians only or by the Catholic Church also? I have read that the Gospels were anonymous, and much later they were named Mark, Mathew, Luke and John (and Luke, Mark and Mathew very similar compared with John).

Now is this more of from a historical perspective, or is this something the Catholic Church will also agree too?

Is it a heretical belief?

Is that stated in each of the Gospels themselves that the authors were inspired by God, or is this a belief that the Catholic Church has stated?
I can't speak for Catholicism in general, but I can say with confidence that they agree that the traditional titles were a later addition. For instance, the Catholic Encyclopedia says, "The first four historical books of the New Testament are supplied with titles..., which, however ancient, do not go back to the respective authors of those sacred writings."

Michael Kruger argues that "we have little reason to doubt the titles of these gospels and thus little reason to doubt the authorship of these books." 

I won't duplicate his full reasoning here, but in essence, he argues that the titles for the books are very early (though not original) and that there is no extant disagreement about them. Also, if one were trying to bolster a book's credibility with a famous name, one wouldn't choose a lesser known character like Mark or Luke (a Gentile!) to do it.

Why would they have written anonymously? He suggests it parallels the OT practice in historical books, which were likewise anonymous, and places them in the tradition of OT historiographical practice. "Such a stylistic device allowed the authors of the gospels 'to disappear' and to give 'highest priority to their subject matter.'"

As for material covered, yes Matthew, Mark, and Luke have some considerable overlap, though the exact figure of how much depends on how you count. This is commonly called the synoptic problem. It has been known from ancient times and is not a heresy, though it can be taken in an unbelieving direction, as with most anything. In the second century, Tatian produced his Diatessaron, a harmony of the four gospels that cleaned it all up, but the church stuck with the "redundancy" of the four originals.

As for how the authors viewed their task, Kruger has a general answer for the NT and an answer for the book of Matthew in particular. The latter argues from the text itself (esp. the first chapter) that Matthew clearly saw himself as continuing the biblical history from the OT with the story of Jesus.

The other gospels show some additional hints of their purpose, as in John 20:30f (emphasis mine): "The disciples saw Jesus do many other miraculous signs in addition to the ones recorded in this book. But these are written so that you may continue to believe that Jesus is the Messiah, the Son of God, and that by believing in him you will have life by the power of his name." The author's understanding of inspiration and accuracy is touched on within the gospel itself, as when Jesus says in John 14:25f, "All this I have spoken while still with you. But the Advocate, the Holy Spirit, whom the Father will send in my name, ... will remind you of everything I have said to you." Compare also Luke 1:1-5 and Acts 1:1-3 on Luke's stated purpose and method of composition.

The doctrine of inspiration starts in passages like 2 Timothy 3:16 and 2 Peter 1:20 and proceeds from there.