This question is motivated by this other one.
A classical result of linear algebra states what follows
Up to scalar, trace is the only linear operator $\text{M}(n,k) \stackrel{t}{\to} k $ such that $t(AB) = t(BA)$.
So there are two natural generalization of the problem. The first one is in the direction of replacing $k$ with a ring $A$. The other is to ignore the restriction to finite dimensional vector spaces.
Here we stick with the second one.
For an infinite dimentional topological vector space $V$, a trace operator is a continuous functional End($ V) \stackrel{tr}{\to} k$ such that $tr(fg)=tr(gf)$.
Can we recover a partial result? How many trace operators are there?
An Example
In the special case of $$V = \bigcup_n \mathbb{R}^n,$$ one obtains the same result of finite dimensional vector spaces, because $V$ is the directed colimit of $\mathbb{R}^n$ and each of them is finitely presentable. This proves that
There are no trace operators on $V = \bigcup_n \mathbb{R}^n$ but the $0$ map.
because trace of identity would be infty.
One can use this as an alternative proof of the fact (which I ignored till today) that
The space generated by $fg-gf$ is the whole space of endomorphisms of $\bigcup_n \mathbb{R}^n$.
In fact, if not, there would be an hyperplane $H$ in which is contained and quotienting by $H$ one would get a trace operator.
This example is quite demotivating in the direction of hoping for a natural trace notion of infinity dimensional vector spaces. Maybe the geometry of the trace is encoded in finite dimensional objects. Or in bounded endomorphisms, which is somehow the other side of the coin.
An other example
For an infinite dimensional Banach space $V$ the question if much harder but
Is it true that for a compact operator $f$ we have $$tr(f) = \sum \text{eigenvalues} $$ up to normalization for any trace operator?
This would be a fair generalization of trace to general operators.
Here the answer is a little more tricky that the other question. Michael Shulman here says what can be done about traces for dualizable objects in closed monoidal categories. From this we see that we can't really export much of these results because dualizability is some sort of finiteness condition and we cannot really expect it for general Banach spaces.
In this paper Stolz and Teichner make the generalization you are looking for. Given a monoidal category they characterize a particular subsets of the morphisms and a class of objects: those for which the trace is defined. They take the set $X\otimes Y$ with the biggest norm such that $\|x\otimes y\|\leq\|x\|y\|$, and define the tensor product of the spaces $X$ and $Y$ to be the closure of the above and denote it with $X\otimes_\pi Y$.
Now we have a natural continuous and linear morphism $F:X\otimes_\pi Y^\star\to\mathbf{Ban}(X,Y)$ defined $F(x\otimes T)(y)=xT(y)$ which in the case $X=Y$ gives as all the morphisms we are looking for. The image of the morphism $$F:X\otimes_\pi X^\star\to\mathbf{Ban}(X,X)$$ is the set of all the trace class morphisms when the identity of $X$ can be approximated by finite rank operators with respect to the compact open topology.
They prove this result for topological vector spaces. At page 21 they say the following, which helps us understand the requirements: given a net $I_\nu$ converging to the identity and $f$ a morphisms in the class defined above, then $f\circ I_\nu$ is finite rank and $$Tr(f)=\lim_\nu\ Tr(f\circ I_\nu),$$ where the limit is taken with regards to the compact-open topology.