How to split faces where they intersect I am working in edit mode in Blender 2.8.

There is a volume through which I constructed 2 planes. Now I want to remove the excess parts. To do so, I think I need to split the faces where they intersect.

See the image: I want to remove all parts marked with a red cross.

To do this, I think I just need to figure out how to create the edges with the green dotted lines, but I can't figure out how to do this.

Maybe another way to explain this: if you look at both the horizontal and vertical line in the front, these do not intersect. Although they are in the same plane, there is no vertex where they cross and I can't find any button to perform this action.





Solutions I tried:

Rip apart the faces. In the screenshot I'm trying to adjust one of the faces, but this doesn't really merge the top edge with the horizontal face, which is what I'm looking for. Or maybe I'm not using the tool correctly.
Go into face select mode and select the faces you want to delete then press x so the delete menu will appear then select face to delete the face and to again close the open face go to edge select mode and select the edges you want to close and press f to make the face.