These results are typical of elections held in a president's first midterm, but actually President Trump fared better than his immediate two Democrat predecessors.
In 1994, President Clinton's first midterm, the Democrats lost 54 House seats and 8 senate seats, losing control of both houses; and in President Obama's first midterm in 2010, the Democrats lost 69 House seats and six senators.
It should be noted that President Clinton and President Obama each won reelection two years after their "first midterm wipeouts," so don't write off President Trump's chances of reelection just yet.
The four Democrat senate seats won by Republicans all were in states carried by the President in 2016, and all four Democrats had toed the party line and voted against Brett Kavanaugh's nomination to the Supreme Court. President Trump had singled these four out for defeat, and all were defeated. He also had made a strong effort to unseat Senator Tester from Montana, but he narrowly won reelection, aided by a third party candidate siphoning votes from the Republican challenger.
Midterm checks certainly harm a president's agenda and his ability to get things done, but they also can concentrate his mind and make him work harder. And many of the Democrats who were victorious are from the left wing of their party; it will be interesting to see if any of them vote against Nancy Pelosi as speaker. The Republicans also face a major race for party leadership, and it will boil down to an "establishment vs. conservative" that may prove contentious.
If the Democrats go "hard left" the Republicans may well win back in two years much of what they lost this time, but if the Republicans split between moderates and conservatives, they might not be able to capitalize on any overreach by the Democrats.
To sum up, the President will have major problems in the House, but a slightly easier time in the Senate, and he should be able to have the senate continue to confirm his judicial nominees.
It was a very good election for the Democrats, and they will be able to stop the President from implementing his goals in the House, but with the Republicans retaining the Senate, the parties will have to compromise on major legislation. Each party faces dangers of going "too ideological" in the coming session, and each has to be careful not to be seen as obstructionist; and the President would be wise to adopt a more conciliator and respectful tone.