I was thinking of persymmetric matrices after I saw this question. Persymmetric matrices are notable in that they satisfy $(Ax,y) = (x,Ay)$, where $(\cdot,\cdot)$ the bilinear form over $\Bbb R^{n}$ given by $$ (x,y) = x_1y_n + x_2 y_{n-1} + \cdots + x_{n-1}y_2 + x_n y_1. $$ I suspect that if $A$ is "self-adjoint" relative to this bilinear form, then $A$ must be diagonalizable. However, the usual proof of the spectral theorem cannot be extended to this context because of the existence of non-zero vectors $x$ for which $(x,x) = 0$.
Is my suspicion correct? Does there exist some generlization of the spectral theorem to this context? Are there further generalizations (e.g. to non-symmetric bilinear forms)?
Counterexample: Take $n=2$. The given form is $$(x,y)=x^* Qy=x^*\begin{pmatrix}0&1\\1&0\end{pmatrix}y$$ Self-adjointness with respect to $Q$ is equivalent to $$x^*A^*Qy=(Ax,y)=(x,Ay)=x^*QAy$$ $$\iff A^*Q=QA$$ Let $A=\begin{pmatrix}1&1\\0&1\end{pmatrix}$. Then it is routine to show it is self-adjoint wrt $Q$, yet there is no matrix $P$ such that $P^{-1}AP$ is diagonal.