According to the comments the only ugly part was the devectorization.
Consider the 3x3 matrix $${\bf X}=\left[\begin{array}{ccc}
1&2&3\\4&5&6\\7&8&9\end{array}\right]$$
It's lexical vectorization is:
$$\text{vec}({\bf X}) = \left[\begin{array}{ccccccccc}1&4&7&2&5&8&3&6&9\end{array}\right]^T$$
We consider that kind of vectorization here.
The Matlab / Octave expression:
kron([1,0,0]',eye(3))'*kron(R(:),[1,0,0])+
kron([0,1,0]',eye(3))'*kron(R(:),[0,1,0])+
kron([0,0,1]',eye(3))'*kron(R(:),[0,0,1])-R
evaluates to the zero matrix for several random matrices R, each new term "selecting" a new row.
Then a guess would be that
$${\bf R}=\sum_k({\bf v_k} \otimes {\bf I})^T(\text{vec}({\bf R})\otimes {\bf v_k}^T)$$
With $\bf v_k$ being the Dirac or selector vector:
$$({\bf v_k})_i = \cases{0, k \neq i\\1, k=i}$$
Feel free to try and simplify it if you want.
Let's denote the elementwise/Hadamard and inner/Frobenius products respectively as
$$\eqalign{
A &= B\circ C \cr
\alpha &= B:C = {\rm tr}(B^TC) \cr
}$$
Recall that these products are commutative, and mutually commutative
$$\eqalign{
A\circ B &= B\circ A \cr
A:B &= B:A \cr
A:B\circ C &= A\circ B:C \cr
}$$ and that the matrix of all ones is the identity element for the Hadamard product. Note that the matrices $(A,B,C)$ must have the same shape for these products to make sense.
Your scalar function can be written as
$$\eqalign{
y
&= 1:f \cr
&= 1:(Ax)\circ(Bx) \cr
&= Ax:Bx \cr
}$$
Whosee differential and gradient are
$$\eqalign{
dy
&= A\,dx:Bx + Ax:B\,dx \cr
&= Bx:A\,dx + Ax:B\,dx \cr
&= (A^TB + B^TA)\,x:dx \cr
\cr
\frac{\partial y}{\partial x}
&= (A^TB + B^TA)\,x \cr\cr
}$$
(Note that I've used juxtaposition rather than $*$ for the ordinary matrix product.)
Best Answer
The easiest approach is to observe, with $\big \Vert \mathbf x_k\big \Vert_2, \big \Vert \mathbf y_k\big \Vert_2 = 1$ and using the operator 2 norm (i.e. Schatten $\infty$ norm) for our matrices
$\text{max: }\mathbf x_1^*(A \otimes B)\mathbf y_1 =\big \Vert A \otimes B\big \Vert_2 = \sigma_1^{(A)}\sigma_2^{(B)} = \big \Vert A \big \Vert_2 \big \Vert B\big \Vert_2 $
where $\otimes$ denotes Kronecker Product
Then observe that $(A \circ B)$ is a principal submatrix of $(A\otimes B)$ so
$\big \Vert A \circ B\big \Vert_2 = \text{max: }\mathbf x_2^*(A \circ B)\mathbf y_2 \leq \text{max: }\mathbf x_1^*(A \otimes B)\mathbf y_1$
The Hadamard Product is rather hard to work directly with. The Kronecker Product is quite easy to work with, so it's desirable to prove an awful lot of HP inequalities via use of the KP.