To me, anger on the court usually indicates external issues that we carry out there, and most of us have experienced it.
If playing matches against even friends is no longer fun, I'd just stop doing it. Find practice partners that will be happy to hit and play points without the competitive pressure. Unless you're playing for big money there is no reason to submit yourself to something you no longer enjoy.
Tennis can be enjoyed in many ways other than just playing games and matches.