The answer is YES, in theory. TSA is supposed to allow you access to the checkpoint of any terminal at an airport where you have a valid boarding pass for a departing flight on the same day. It should work 60-70% of the time by simply explaining that you are going to visit the lounge.
The issue I have encountered is that at large airports, there are often contract agents (such as Eulen America), working on behalf of the airlines, that police the entry to the lines, to make sure that only PreCheck pax are in the PreCheck line, Premium class pax are in the Priority line, verify carry-on luggage size/quantity, etc. Those agents sometimes will refuse to let you through without a boarding pass for an airline that departs from the specific terminal behind that checkpoint. You might need to ask for a supervisor or an escort from an actual airline rep. But if you are dealing with TSA directly, it should not be a problem. Just explain what you want to do, and be clear that you understand that you will have to leave and re-clear security in another terminal in order to board your flight.