Erase part of mesh beyond intersection
Know all the mesh selection tools.

In your case the Lasso or Circle Select tool could help.



Other mentionworthy tools:

Expand Selection - &#9096; CtrlNumpad+
Reduce Selection - &#9096; CtrlNumpad-
Select Edge Loop - &#9095; Alt RMB

You could also use a boolean modifier.

Select the torus and apply a boolean modifier with the cup as Object and the Method to Difference. Apply the modifier. Now you can use the Select Linked Tool L to delete the unneeded vertices.