Beamspace millimeter-wave (mmWave) and terahertz (THz) massive MIMO constitute attractive schemes for next-generation communications, given their abundant bandwidth and high throughput. However, their user and beam selection problem has to be efficiently addressed. Inspired by this challenge, we develop low-complexity solutions explicitly. We introduce the dirty paper coding (DPC) into the joint user and beam selection problem, unveil the compelling properties of the DPC sum rate optimization in beamspace massive MIMO and exploit them for substantially simplifying the problem. We also develop three algorithms for solving the simplified problem, each having its unique merits. Furthermore, we derive the sum rate bound of the algorithms and analyze their complexity. Our simulation results validate the effectiveness of the proposed design and analysis, confirming their superiority over prior solutions.